mirror of
https://github.com/servo/servo.git
synced 2025-06-20 07:08:59 +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)
|
||||
if force:
|
||||
print("Removing " + name)
|
||||
if os.path.isdir(name):
|
||||
shutil.rmtree(name)
|
||||
else:
|
||||
os.remove(name)
|
||||
else:
|
||||
print("Would remove " + name)
|
||||
if not removing_anything:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue