Skip to content

fix(file): prevent parent directory deletion in deleteDirectory#81

Merged
benkhalife merged 1 commit into
masterfrom
bug-filedeletedirectory-recursively-deletes-parent-directories-due-to-missing-dot-file-filtering
Jun 14, 2026
Merged

fix(file): prevent parent directory deletion in deleteDirectory#81
benkhalife merged 1 commit into
masterfrom
bug-filedeletedirectory-recursively-deletes-parent-directories-due-to-missing-dot-file-filtering

Conversation

@benkhalife

Copy link
Copy Markdown
Member

Refactored deleteDirectory using RecursiveDirectoryIterator with SKIP_DOTS. This fixes a critical bug where unescaped .. paths caused the method to recursively delete files in parent directories (like .env). Fixed #79

Refactored `deleteDirectory` using `RecursiveDirectoryIterator` with `SKIP_DOTS`.
This fixes a critical bug where unescaped `..` paths caused the method to
recursively delete files in parent directories (like `.env`).
Fixed #79
@benkhalife
benkhalife merged commit b99f830 into master Jun 14, 2026
1 check passed
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.

Bug: File::deleteDirectory() recursively deletes parent directories due to missing dot-file filtering

1 participant