Skip to content

Fix removal of symlinked directories#1744

Merged
deathaxe merged 1 commit into
masterfrom
fix/unix-symlink-removal
May 19, 2026
Merged

Fix removal of symlinked directories#1744
deathaxe merged 1 commit into
masterfrom
fix/unix-symlink-removal

Conversation

@deathaxe

@deathaxe deathaxe commented May 18, 2026

Copy link
Copy Markdown
Collaborator

This commit teaches clear_directory() function to use os.unlink to remove symlinked directories on Linux/MacOS.

Addresses Lib/ dir cleanup-issue, reported at sublimehq/sublime_text#6913

This commit teaches `clear_directory()` function to use `os.unlink` to remove
symlinks on Linux/MacOS to prevent target directories from being deleted.

Note: Modern python raises errors, when calling `os.rmdir()` on symlinks.
@deathaxe deathaxe merged commit 1b27694 into master May 19, 2026
8 checks passed
@deathaxe deathaxe deleted the fix/unix-symlink-removal branch May 19, 2026 15:56
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