-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Files stop being shared after a recipient restores them to previous versions #15468
Comments
@PVince81 stable file id issue? |
Hmmmm, possibly. @schiesbn does restoring a version creates a new file cache entry ? If yes we need to fix the versions app to keep it. @SergioBertolinSG did you check if that worked on OC 6 / OC 7 ? (to make sure whether it's a regression or not, I thought it used to work in the past) |
Ref: #13310 File ids must stay stable |
In version 7 it is working fine, is a regression. |
Thanks. @DeepDiver1975 setting to 8.0.3 |
Also happens on 8.0.2 and also happens when reverting a file inside a shared folder (revert as recipient) |
I'll try and bisect this somehow. |
It goes as far as #14584 from @icewind1991 which fixed reverting files. Not sure yet if that PR is causing the new issue or what the difference is with OC 7. |
@icewind1991 I debugged a bit and it indeed seems to be related to the PR. What was wrong with the I'll try and see how it was done in OC 7.0.5. |
In OC7 there is no code to update the cache. Strange. And the post rename proxy isn't called, maybe because the source file is in "files_versions" and moved to "files". |
@icewind1991 can you explain why cache move() wasn't called in OC 7 but is now in OC 8 ? I guess the proper fix is to make "move()" operation properly update the element and also keep the file id. But also there's the question which fileid to keep, the source one or target one ? So... tricky stuff... |
Another alternative is to add extra code to the versions app to reuse the original file id and pass it to the rename method. |
or even more barbaric: do a stream copy 😛 |
I'll prepare a unit test to reproduce the issue until a proper solution comes to mind... |
The behaviour of the cache move is correct, when overwriting A way to solve this might be to do the rename directly on the storage and update the scan for the file manually |
So overwriting a file through rename should reset the file id, that makes sense. It should reuse the source file id, I think it does that already. What do you mean with "do the response directly on the storage" ? |
Yes |
Hmmm what if the target file is on external storage ? |
Just tried it: for external storage it will use the stream copy approach, which doesn't need the cache update, so it keeps the file id. Maybe if there was a way to force a stream copy... |
On the other hand if we want to be consistent with the rename logic you mentioned, even a stream copy should be made to affect the file id. |
I think #15360 fixes that |
Ok cool. I think for this versions bug I'll stream copy the version file into the target file, always. |
Fix is here: #15486 |
Changed milestone according to #15486 (comment) |
Steps to reproduce
Having a OC server installed and two users, User1 and User2.
Expected behaviour
File returns to previous version and keeps shared.
Actual behaviour
File returns to previous version but it stops being shared, so User2 stops seeing the file.
Server configuration
Operating system:
Ubuntu 14.04 LTS
Web server:
Apache
Database:
MySQL
PHP version:
5.5.9
ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"8.0.3.0","versionstring":"8.0.3 RC1","edition":"Enterprise"}
Updated from an older ownCloud or fresh install:
Fresh
List of activated apps:
Default in enterprise version.
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption:
no
Logs
Client configuration
browser
Chrome 41
Operating system
Mac OS X
The text was updated successfully, but these errors were encountered: