-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
Feature/ghostbust dead symlinks #579
Feature/ghostbust dead symlinks #579
Conversation
0835160
to
8683ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not tested. LGTM (minus the small editions).
I think this would be a good idea. This would allow the use of the command to remove ghosts files (which is usually safe) while retaining the ability to not modify the database (for the photos). |
Changes made. Thanks! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Anything else I need to tackle before this gets merged? |
Resolves #578
A couple of caveats here: I had to manually delete the 'big' file path even though we are calling
->delete()
on the photo because inside thepredelete
method,Storage::exists
actually returnsfalse
if you pass in a dead symlink. So a predelete and delete is not enough here, have to manually unlink the dead symlink itself.Something to consider: should this be an additional flag we pass into the ghostbuster command? I'm thinking in the event that images are mounted on an external drive, NFS, whatever and are 'temporarily' unavailable. Just something to keep in mind.