Skip to content

Auto-repair ghost files #24499

Closed
Closed

Description

@PVince81

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

Activity

  1. added this to the milestone on May 9, 2016
  2. DeepDiver1975 commented on May 9, 2016

    @DeepDiver1975
    Contributor

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

  3. PVince81 commented on May 9, 2016

    @PVince81
    ContributorAuthor

    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)

  4. rullzer commented on May 10, 2016

    @rullzer
    Contributor

    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?

  5. PVince81 commented on Jun 7, 2016

    @PVince81
    ContributorAuthor

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

  6. lock commented on Aug 4, 2019

    @lock

    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.

  7. locked as resolved and limited conversation to collaborators on Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions