Versioning in a shared folder: Moving a file to another folder makes former versions unavailable
I looked for a similar issue, but didn't find it. I hope it's not a duplicate.
Steps to reproduce
- test.doc is in FolderA
- make modifications to test.doc in order to have several versions, available in the versioning system
- move test.doc to FolderB (in the Windows explorer or in the web interface, the effect is the same)
- if the move as been done on the deskopt, wait for the sync is completed by Mirall
- Go to FolderB in the web interface
- test.doc is there, but no former version are available
Expected behaviour
- Versions should be kept available, even if the file is moved to another folder
- Versions should be kept too if this new folder is not in the same synced folder (I mean, a different set up in Mirall)
Actual behaviour
- Versions are not available anymore
- Versions are available again if I move the file back to the initial folder
Server configuration
Operating system: Ubuntu 14.04 Web server: Apache Database: MySQL ownCloud version: 7.0.2
Are you using external storage, if yes which one: No Are you using encryption: yes
Client configuration
Browser: FF31 Operating system: Windows 8.1 Mirall: 1.6.4
As the file was in a shared folder, I investigated a little further, and I found out that the behaviour happens only if the folder is shared. In my case, FolderA is shared with me by another user. FolderB is a subfolder of FolderA. If the file is not in a shared folder, it's working fine as far as I tested it.
Further investigation:
- In the case I'm not the creator of the initial folder and I'm not the one who shared the folder: no matter if I created the document or not. Versions are not available anymore in both cases.
- In the case I'm the creator of the folder and I shared it: former versions are available even if I move the file. If somebody else moves the file, versions are not available anymore.
It looks like the versioning system doesn't manage the versions correctly if the folder is shared by somebody else.
@schiesbn What do you think?
Confirmed on master 5d391910c52309d7c538a2494927b3720dc06d0a
The files inside of "files_versions" are still in the old folder, not the new one, after moving.
I can reproduce it and will provide a fix soon
Great ;)
@etiess maybe you want to test the pull request #11825, this should solve the issue
@schiesbn Thank you for your consideration and your quick fix. But I won't test it, I'm afraid it wouldn't be "usefull" https://github.com/owncloud/mirall/issues/1785#issuecomment-60932937
@etiess I can't judge what happened at the mirall repository. But I can guarantee you that testing this PR would be useful if you want to get the fix in. The PR already has one reviewer. If you say that it works it will be merged, if it doesn't work we can address it directly in the same PR. Of course you can also just sit back, wait for another reviewer and cross your finger that this will solve all issues for you (btw. I'm quite confident that it will).
Sorry to have put you in my irritation yesterday, but I was really disappointed: I was reporting a lot of gdb backtrace without feedback until the issue has been closed. Anyway, I don't want to continue the discussion here because it has been "locked" there.
Considering this current issue, I'm affraid I can't test it anyway as I don't know how to include it in my owncloud server. And as I have only one server, which is in production, I wouldn't like to break something. Sorry :(
Great @schiesbn !
In which public available final version would I be able to test it? 7.0.3? Thank you again!
@schiesbn I updated to 7.0.3 this morning: I can confirm that previous version are moved too. Restoring works too. But the thumbnail is wrong (encrypted version) and if I download a previous version, the encrypted file is downloaded. And this is the case even before moving the files to another folder. Is it the same issue or is it necessary to open a new issue? Thank you
Is it the same issue or is it necessary to open a new issue?
This is most likely a encryption bug and not a sharing bug. Please open a new issue for it and mention me, thanks!