diff options
author | B Stack <bgstack15@gmail.com> | 2019-12-27 17:39:04 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-12-27 17:39:04 +0000 |
commit | b40c382a3d80f83130fe011e99aee3b64c469c81 (patch) | |
tree | bd720ccfbafe56fe614a349592e5a8dc3fe2829a /freefilesync/ffs_no_eraseif.patch | |
parent | Merge branch 'updates' into 'master' (diff) | |
parent | fix ffs_el.patch serialize.h (diff) | |
download | stackrpms-b40c382a3d80f83130fe011e99aee3b64c469c81.tar.gz stackrpms-b40c382a3d80f83130fe011e99aee3b64c469c81.tar.bz2 stackrpms-b40c382a3d80f83130fe011e99aee3b64c469c81.zip |
Merge branch 'freefilesync-bump' into 'master'
FreeFileSync 10.19
See merge request bgstack15/stackrpms!110
Diffstat (limited to 'freefilesync/ffs_no_eraseif.patch')
-rw-r--r-- | freefilesync/ffs_no_eraseif.patch | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/freefilesync/ffs_no_eraseif.patch b/freefilesync/ffs_no_eraseif.patch index eaaab38..d820cad 100644 --- a/freefilesync/ffs_no_eraseif.patch +++ b/freefilesync/ffs_no_eraseif.patch @@ -1,3 +1,4 @@ +Message: generated with roughly sed -i -r -e 's/std::erase_if/eraseIf/g' $( grep -l -riIE 'std::erase_if\(' ) diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 10.18-2/FreeFileSync/Source/afs/abstract_impl.h --- 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 16:15:55.823668066 -0500 +++ 10.18-2/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 17:57:30.555558350 -0500 @@ -10,11 +11,11 @@ diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source //get or create mutex std::weak_ptr<std::mutex>& weakPtr = pathLocks[nativePath]; -diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/gdrive.cpp 10.18-2/FreeFileSync/Source/afs/gdrive.cpp ---- 10.18-1/FreeFileSync/Source/afs/gdrive.cpp 2019-11-20 16:15:55.828668123 -0500 -+++ 10.18-2/FreeFileSync/Source/afs/gdrive.cpp 2019-11-20 17:57:30.556558361 -0500 -@@ -1777,7 +1777,7 @@ - if (it != itemDetails_.end()) +diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/afs/gdrive.cpp 10.19-1/FreeFileSync/Source/afs/gdrive.cpp +--- 10.18-0/FreeFileSync/Source/afs/gdrive.cpp 2019-11-20 16:15:55.828668123 -0500 ++++ 10.19-1/FreeFileSync/Source/afs/gdrive.cpp 2019-12-27 11:17:35.793612360 -0500 +@@ -1788,7 +1788,7 @@ + if (auto it = itemDetails_.find(itemId); it != itemDetails_.end()) { GoogleItemDetails detailsNew = it->second; - std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; }); @@ -22,7 +23,7 @@ diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source notifyItemUpdate(stateDelta, itemId, detailsNew); } else //conflict!!! -@@ -1792,7 +1792,7 @@ +@@ -1802,7 +1802,7 @@ GoogleItemDetails detailsNew = it->second; detailsNew.itemName = utfTo<std::string>(newName); @@ -31,7 +32,7 @@ diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source detailsNew.parentIds.push_back(parentIdTo); //not a duplicate notifyItemUpdate(stateDelta, itemId, detailsNew); -@@ -1902,7 +1902,7 @@ +@@ -1911,7 +1911,7 @@ return; //=> avoid misleading changeLog_ entries after Google Drive sync!!! //update change logs (and clean up obsolete entries) @@ -40,7 +41,7 @@ diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source { if (std::shared_ptr<ItemIdDelta> iid = weakPtr.lock()) { -@@ -1923,8 +1923,8 @@ +@@ -1932,15 +1932,15 @@ std::vector<std::string> parentIdsNew = details->parentIds; std::vector<std::string> parentIdsRemoved = it->second.parentIds; @@ -51,26 +52,25 @@ diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source for (const std::string& parentId : parentIdsNew) folderContents_[parentId].childItems.push_back(it); //new insert => no need for duplicate check -@@ -1933,7 +1933,7 @@ - { - auto itP = folderContents_.find(parentId); - if (itP != folderContents_.end()) + + for (const std::string& parentId : parentIdsRemoved) + if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) - std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); + eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); - } //if all parents are removed, Google Drive will (recursively) delete the item => don't prematurely do this now: wait for change notifications! -@@ -1955,7 +1955,7 @@ - { - auto itP = folderContents_.find(parentId); - if (itP != folderContents_.end()) + it->second = *details; +@@ -1959,7 +1959,7 @@ + { + for (const std::string& parentId : it->second.parentIds) //1. delete from parent folders + if (auto itP = folderContents_.find(parentId); itP != folderContents_.end()) - std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; }); + eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; }); - } + itemDetails_.erase(it); } -@@ -1964,7 +1964,7 @@ - if (itP != folderContents_.end()) +@@ -1967,7 +1967,7 @@ + if (auto itP = folderContents_.find(itemId); itP != folderContents_.end()) { for (auto itChild : itP->second.childItems) //2. delete as parent from child items (don't wait for change notifications of children) - std::erase_if(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; }); |