Skip to content

Commit

Permalink
Fix delete_directory() ignore_errors handling
Browse files Browse the repository at this point in the history
Also respect the argument when removing symlinks.
  • Loading branch information
deathaxe committed Oct 11, 2023
1 parent a7fc33c commit 5b0c520
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package_control/clear_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def delete_directory(directory, ignore_errors=True):
os.unlink(directory)
return True
except OSError:
pass
if not ignore_errors:
raise

elif clear_directory(directory, ignore_errors=ignore_errors):
try:
Expand Down

0 comments on commit 5b0c520

Please sign in to comment.