core icon indicating copy to clipboard operation
core copied to clipboard

Versioning in a shared folder: Moving a file to another folder makes former versions unavailable

Open etiess opened this issue 12 years ago • 13 comments

I looked for a similar issue, but didn't find it. I hope it's not a duplicate.

Steps to reproduce

  1. test.doc is in FolderA
  2. make modifications to test.doc in order to have several versions, available in the versioning system
  3. move test.doc to FolderB (in the Windows explorer or in the web interface, the effect is the same)
  4. if the move as been done on the deskopt, wait for the sync is completed by Mirall
  5. Go to FolderB in the web interface
  6. 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

etiess avatar Oct 24 '14 12:10 etiess

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.

etiess avatar Oct 24 '14 12:10 etiess

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.

etiess avatar Oct 24 '14 13:10 etiess

@schiesbn What do you think?

karlitschek avatar Oct 24 '14 16:10 karlitschek

Confirmed on master 5d391910c52309d7c538a2494927b3720dc06d0a

The files inside of "files_versions" are still in the old folder, not the new one, after moving.

PVince81 avatar Oct 27 '14 10:10 PVince81

I can reproduce it and will provide a fix soon

schiessle avatar Oct 28 '14 14:10 schiessle

Great ;)

etiess avatar Oct 28 '14 15:10 etiess

@etiess maybe you want to test the pull request #11825, this should solve the issue

schiessle avatar Oct 28 '14 16:10 schiessle

@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 avatar Oct 29 '14 15:10 etiess

@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).

schiessle avatar Oct 30 '14 16:10 schiessle

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 :(

etiess avatar Oct 30 '14 16:10 etiess

Great @schiesbn !

In which public available final version would I be able to test it? 7.0.3? Thank you again!

etiess avatar Nov 03 '14 11:11 etiess

@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

etiess avatar Nov 12 '14 18:11 etiess

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!

schiessle avatar Nov 17 '14 10:11 schiessle