fix remove() on symlink-to-dir

This commit is contained in:
Will Woods 2011-05-31 11:31:21 -04:00
parent dde2b9ae62
commit bdb35b7822

View File

@ -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)