fix: Remove symlink reguardless of source path's existence

This commit is contained in:
John Colvin committed 2023-03-20 13:26:43 -04:00
1 parent b03cb94d60
commit 8158bcb4f3
1 file changed
+1 -3
+1 -3
View File
@@ -148,11 +148,9 @@ def unlink(path):
def rmdir_or_unlink(dir):
if not os.path.exists(dir):
return
if os.path.islink(dir):
os.unlink(dir)
else:
elif os.path.exists(dir):
shutil.rmtree(dir)