зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #10923 - Remove dir by shutil.rmtree, remove file by os.remove (from askeing:fix_10922); r=jdm
fix #10922 Source-Repo: https://github.com/servo/servo Source-Revision: 491b5ff47e392f37cb636bbbdeecf5cd6254b401
This commit is contained in:
Родитель
9d3b92895f
Коммит
7833eac81c
|
@ -319,7 +319,10 @@ class MachCommands(CommandBase):
|
|||
name = path.join(base, name)
|
||||
if force:
|
||||
print("Removing " + name)
|
||||
shutil.rmtree(name)
|
||||
if os.path.isdir(name):
|
||||
shutil.rmtree(name)
|
||||
else:
|
||||
os.remove(name)
|
||||
else:
|
||||
print("Would remove " + name)
|
||||
if not removing_anything:
|
||||
|
|
Загрузка…
Ссылка в новой задаче