fix remove() on symlink-to-dir
This commit is contained in:
parent
dde2b9ae62
commit
bdb35b7822
@ -99,7 +99,7 @@ def mvfile(src, dst):
|
||||
return dst
|
||||
|
||||
def remove(target):
|
||||
if os.path.isdir(target):
|
||||
if os.path.isdir(target) and not os.path.islink(target):
|
||||
shutil.rmtree(target)
|
||||
else:
|
||||
os.unlink(target)
|
||||
|
Loading…
Reference in New Issue
Block a user