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

When deleting a file from xbvr files that do not exist on disk cause an error but the file is not removed #1735

Open
Mellified opened this issue May 18, 2024 · 0 comments

Comments

@Mellified
Copy link

Deleting a file from the xbvr web interface will fail if the file does not exist. The file is not removed from the xbvr database in this case however. This makes it difficult for users to clean up stale files that were removed from outside xbvr.

Instead, xbvr should leave databases entries in place only if the error returned by the underlying OS/filesystem is something other than "file not found" or equivalent. If the error is "file not found" then xbvr should remove that entry in the database.

Example log:

level=info msg="Deleting file /adult_v1/Funscripts/Free/Give In Vol 2 - Videos - Hypnotube.funscript"
level=error msg="error deleting file: remove /adult_v1/Funscripts/Free/Give In Vol 2 - Videos - Hypnotube.funscript: no such file or directory"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant