clean: properly handle removing symbolic links
This commit is contained in:
parent
ab839658ba
commit
0ccc15089b
4
jsvn
4
jsvn
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user