Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client 2.5.0 deletes files that are moved into a renamed folder #6808

Closed
jnweiger opened this issue Oct 11, 2018 · 6 comments
Closed

client 2.5.0 deletes files that are moved into a renamed folder #6808

jnweiger opened this issue Oct 11, 2018 · 6 comments
Assignees
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Milestone

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Oct 11, 2018

Ubuntu 18.04 linux mint 19 tara

Connect to demo.owncloud.org, wait until the skeleton files have synced. In my case the main sync folder was ownCloud7.

Execute the following commands:

cd ownCloud7
ls -la Photos/Squirrel.jpg
  -rw-r--r-- 1 testy testy 233724 Okt 11 22:22 Photos/Squirrel.jpg
mkdir foo
sleep 2
mv foo bar
sleep 2
mv Photos/Squirrel.jpg bar

Check with a web browser: Squirrel.jpg is no longer on the demo.owncloud.org -- neither in Photos nor in bar.

The client Sync Protocol window logs this (from bottom to top):

   11.10.18 22:53:11,       Photos/Squirrel.jpg,     ownCloud7,        Deleted,          
   11.10.18 22:52:57,                       foo,     ownCloud7,   Moved to bar,          
   11.10.18 22:52:48,                       foo,     ownCloud7,       Uploaded,          
   11.10.18 22:52:22,       ownCloud Manual.pdf,     ownCloud7,     Downloaded,    4,7 MB
   11.10.18 22:52:14,       Photos/Squirrel.jpg,     ownCloud7,     Downloaded,    228 KB
   11.10.18 22:52:11,  Photos/San Francisco.jpg,     ownCloud7,     Downloaded,    211 KB
   11.10.18 22:52:08,          Photos/Paris.jpg,     ownCloud7,     Downloaded,    223 KB
   11.10.18 22:52:05,     Documents/Example.odt,     ownCloud7,     Downloaded,     35 KB
   11.10.18 22:52:02,                    Photos,     ownCloud7,     Downloaded,          
   11.10.18 22:52:02,                 Documents,     ownCloud7,     Downloaded,       

On the client side the file Squirrel.jpg still exists in folder bar. But it was deleted on the server, its folder bar is now empty.

echo hey > bar/wakeup.txt

This also does not sync anything to the server. The f12 log mentions wakeup.txt with only one line:

10-11 23:07:24:739 [ info gui.folderwatcher ]:  Detected changes in paths: QSet("/home/testy/ownCloud7/foo/wakeup.txt")

Note that it shows the old folder name foo instead of the actual folder name bar. This is wrong.

@guruz guruz assigned ckamm and ogoffart and unassigned guruz Oct 12, 2018
@guruz guruz added this to the 2.5.1 milestone Oct 12, 2018
@guruz guruz added the type:bug label Oct 12, 2018
@ckamm
Copy link
Contributor

ckamm commented Oct 12, 2018

Very possibly connected to #6804 #6806

@ckamm
Copy link
Contributor

ckamm commented Oct 12, 2018

The folder watcher does indeed produce the wrong touched path on linux: it's inode based so when renaming foo to bar the watcher is retained and the resolution to the directory name is done client-side from a cache.

Since it doesn't update after renames the folder the local discovery list isn't seeded correctly anymore afterwards.

This should not affect windows or osx since subfolders don't require individual watches there.

@jnweiger
Copy link
Contributor Author

@ckamm thanks for the analysis. #6804 indeed looks similar, but was on Win10. There linux inodes cannot be the culprit.

@ckamm
Copy link
Contributor

ckamm commented Oct 12, 2018

@jnweiger Indeed, this is a different problem - just looked similar. Both affect the local discovery skipping though.

ckamm added a commit that referenced this issue Oct 12, 2018
If a folder was renamed A -> B, the folder watcher for the inode
would be unaware and still report changes for A/foo. Now directory
renames in the watched folders are tracked and paths are updated
accordingly.
ckamm added a commit that referenced this issue Oct 12, 2018
If a folder was renamed A -> B, the folder watcher for the inode
would be unaware and still report changes for A/foo. Now directory
renames in the watched folders are tracked and paths are updated
accordingly.
ckamm added a commit that referenced this issue Oct 12, 2018
If a folder was renamed A -> B, the folder watcher for the inode
would be unaware and still report changes for A/foo. Now directory
renames in the watched folders are tracked and paths are updated
accordingly.
@ckamm ckamm added the ReadyToTest QA, please validate the fix/enhancement label Oct 12, 2018
@jnweiger
Copy link
Contributor Author

yep, must be different. I've reproduced the issue with testpilotcloud-client-2.5.1.10803~pr6806+oc-10332
which includes pr#6806 https://download.owncloud.com/internal/repo/ownbrander:/Qt5101:/testpilotcloud/download/

faillog_pr6808.txt

Will try again with current 2.5 with 6809 merged shortly.

@jnweiger
Copy link
Contributor Author

pr6809 fixes the issue!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ReadyToTest QA, please validate the fix/enhancement type:bug
Projects
None yet
Development

No branches or pull requests

4 participants