Skip to content

Remove empty parent directories after folder deletion - #56

Open
fakayser wants to merge 1 commit into
mainfrom
feature/folder-directory-cleanup
Open

fakayser wants to merge 1 commit into
mainfrom
feature/folder-directory-cleanup

Conversation

@fakayser

Copy link
Copy Markdown
Contributor

Deleting a folder could remove its files and empty descendants while leaving the now-empty folder itself on disk. The cleanup loop used the directory list captured before its children were removed.

Recheck the current directory contents during bottom-up cleanup. This removes newly empty parents while preserving remaining files and neighbouring directories. The same behavior applies at every folder depth.

Validation: 29 focused backend tests passed, including nested empty-directory cleanup and preservation of non-empty directories; Ruff checks/format and documentation checks passed. Two frontend-to-real-backend browser scenarios passed, including deleting a root with unregistered empty descendants and deleting a zone root without changing Zones.

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

Successfully merging this pull request may close these issues.

1 participant