Empty folders don't get cleaned up on metadata update, when sidecar files exist #604
Replies: 2 comments
-
🔗 Related PRs#82 - refactor(file): improve path handling and validation [merged] 📝 Issue PlannerCheck the box below or use the
🧪 Issue enrichment is currently in open beta.You can configure auto-planning by selecting labels in the issue_enrichment configuration. To disable automatic issue enrichment, add the following to your issue_enrichment:
auto_enrich:
enabled: false💬 Have feedback or questions? Drop into our discord! |
Beta Was this translation helpful? Give feedback.
-
|
moved to #821 (comment), pending PR |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What Went Wrong?
When sidecar files exist, a Metadata Update that changes the folder does not delete the source location, even though it becomes empty.
How Can We Reproduce This?
o.booklore.service.file.FileMoveHelper : Deleted empty directoryand see dir is gone.What Should Have Happened?
The empty folder should be cleaned up.
Screenshots or Error Messages (Optional)
Logs
Without sidecar files, changing author "Mary Wollstonecraft Shelley" -> "Mary Shelley"
With sidecar files, changing author "Mary Shelley" -> "Mary Wollstonecraft Shelley"
because sidecar, folder's not empty and is retained.
Any Ideas on How to Fix This? (Optional)
I think
fileMoveHelper.deleteEmptyParentDirsUpToLibraryFolders(sourceParent, libraryRoots);needs to be moved aftersidecarMetadataWriter.moveSidecarFiles(currentPrimaryFilePath, newFilePath);to ensure the dir is empty, but I don't have a dev env setup to verify this.Your Setup
Grimmory 2.3.0 docker
Before Submitting
Beta Was this translation helpful? Give feedback.
All reactions