[Pkg-owncloud-commits] [owncloud-client] 129/171: SyncEngine: fix inode after move if the file has moved on the file system
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Feb 17 09:36:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to annotated tag upstream/2.1.1+dfsg
in repository owncloud-client.
commit 47710d167abde5f1ef4a778bde68612171d3121c
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Jan 20 13:44:30 2016 +0100
SyncEngine: fix inode after move if the file has moved on the file system
This is the fix for issue #4370
Step to reproduce the bug:
1) have lots of files in directory "dir1"
2) do mkdir dir2 && mv dir1/* dir2
3) DURING the sync (which takes time because of the many moves) do mkdir dir3 && mv dir2/* dir3/
4) observe that files are PUT in the next sync
The problem is that SyncJournalFileRecord::SyncJournalFileRecord will fail to
get the inode after the forst move because the files are already moved on the
filesystem. Normaly it should use the inode from the discovery phase in that
case but that is not working because it comes from the remote node in case of
moves, so the code in SyncEngine::treewalkFile would not set the inode.
Test in https://github.com/owncloud/smashbox/pull/143
---
src/libsync/syncengine.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index 301c0fb..59dca10 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -451,7 +451,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
}
item->_size = file->size;
- if (!remote) {
+ if (!item->_inode) {
item->_inode = file->inode;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list