clean: properly handle removing symbolic links

This commit is contained in:
josh committed 2015-12-01 13:11:26 -05:00
1 parent ab839658ba
commit 0ccc15089b
1 file changed
+3 -1
+3 -1
View File
@@ -1702,7 +1702,9 @@ def clean_h(argv, svn, out, config):
if dry_run: if dry_run:
out.write("Would remove %s\n" % cp) out.write("Would remove %s\n" % cp)
if force: if force:
if os.path.isdir(cp): if os.path.islink(cp):
os.unlink(cp)
elif os.path.isdir(cp):
shutil.rmtree(cp) shutil.rmtree(cp)
elif os.path.isfile(cp): elif os.path.isfile(cp):
os.unlink(cp) os.unlink(cp)