You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've written a plugin that works like RoU to move files around in my stash instance. It uses move_files to move the files. This may leave empty directories behind. While it's possible to clean up the directories from inside the plugin (rmdir on empty directories), they remain in stash's folder table. The only way to remove them is to run Clean afterward. Running Clean is a little scary because it's such a broad and destructive operation.
Describe the solution you'd like
It would be nice of move_files took a flag to optionally remove the source directory when moving a file (if it's empty). If that folder is empty, it should recursively remove parent directories (up to the respective stash library root) if they're empty.
Describe alternatives you've considered
The problem I want to solve isn't to remove the directories; just to clean up stash. So adding a flag to Clean to just clean up missing directories (so there's no risk of accidentally deleting scenes) would probably be sufficient.
Alternatively there could be a new mutation to delete the folders directly (either do the rmdir and remove them from the folder table or just remove them from the folder table). This seems sufficient, but too hokey.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I've written a plugin that works like RoU to move files around in my stash instance. It uses move_files to move the files. This may leave empty directories behind. While it's possible to clean up the directories from inside the plugin (rmdir on empty directories), they remain in stash's folder table. The only way to remove them is to run Clean afterward. Running Clean is a little scary because it's such a broad and destructive operation.
Describe the solution you'd like
It would be nice of move_files took a flag to optionally remove the source directory when moving a file (if it's empty). If that folder is empty, it should recursively remove parent directories (up to the respective stash library root) if they're empty.
Describe alternatives you've considered
The problem I want to solve isn't to remove the directories; just to clean up stash. So adding a flag to Clean to just clean up missing directories (so there's no risk of accidentally deleting scenes) would probably be sufficient.
Alternatively there could be a new mutation to delete the folders directly (either do the rmdir and remove them from the folder table or just remove them from the folder table). This seems sufficient, but too hokey.
The text was updated successfully, but these errors were encountered: