fix: clean up empty parent category directory on script deletion#232
Open
tejask011 wants to merge 1 commit into
Open
fix: clean up empty parent category directory on script deletion#232tejask011 wants to merge 1 commit into
tejask011 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Issue #231
Description
This pull request resolves the issue where deleting a script left behind an empty category directory on the local filesystem.
Previously, when the last script within a category was deleted, the script file was removed successfully but the now-empty category directory remained under the
scripts/directory. Over time, this could lead to an accumulation of unused empty folders.With this change, the application now automatically checks the parent category directory after a script deletion. If the directory is empty and is not the root
scripts/directory, it is removed automatically.Changes Made
Backend Changes
scripts/directory is never removed.Test Updates
Testing and Validation
Scenarios Tested
1. Delete Last Script in a Category
2. Delete Script While Other Scripts Exist
3. Regression Testing
Screenshots and Logs
No UI changes were introduced as part of this fix.
Checklist
mainscripts/directory remains protected##close #231