mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Remove dir by shutil.rmtree, remove file by os.remove
This commit is contained in:
parent
26be403e3c
commit
c4b0e20bc5
1 changed files with 4 additions and 1 deletions
|
@ -316,7 +316,10 @@ class MachCommands(CommandBase):
|
||||||
name = path.join(base, name)
|
name = path.join(base, name)
|
||||||
if force:
|
if force:
|
||||||
print("Removing " + name)
|
print("Removing " + name)
|
||||||
shutil.rmtree(name)
|
if os.path.isdir(name):
|
||||||
|
shutil.rmtree(name)
|
||||||
|
else:
|
||||||
|
os.remove(name)
|
||||||
else:
|
else:
|
||||||
print("Would remove " + name)
|
print("Would remove " + name)
|
||||||
if not removing_anything:
|
if not removing_anything:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue