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

Auto-repair ghost files #24499

Closed
PVince81 opened this issue May 9, 2016 · 5 comments
Closed

Auto-repair ghost files #24499

PVince81 opened this issue May 9, 2016 · 5 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented May 9, 2016

In some bug situations, it can happen that a file was removed from storage but the filecache still contains it. In such situations, it is impossible for the user to delete the file while it still appears in the web UI and Webdav.

One solution is usually running occ files:scan.

However, it would be good if ownCloud could detect this situation and auto-clean the bogus entry.
To detect this:

  • whenever accessing/deleting a file that is in the file cache but file operation returns "not found"

@icewind1991

@DeepDiver1975
Copy link
Member

whenever accessing/deleting a file that is in the file cache but file operation returns "not found"

but we have to be careful with temporal scenarios ...

@PVince81
Copy link
Contributor Author

PVince81 commented May 9, 2016

but we have to be careful with temporal scenarios ...

Indeed, maybe call file_exists again on that file to verify that it is indeed gone. (for example after a failed fopen)

@rullzer
Copy link
Contributor

rullzer commented May 10, 2016

I get it... but this 'could' open up a can of worms. If a mountpoint is not there (user mounting external disk as their data dir for example) a sync from the client might delete all entries... and with it all shares/comments etc.

Wouldn't it be better to allow deletion of not found files? But a get would return a temp not available?

@PVince81
Copy link
Contributor Author

PVince81 commented Jun 7, 2016

Fixed by #24813 by detecting a failed deletion and then calling file_exists to double check.

@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants