[buildcore] Fix pybb mkdir
This commit is contained in:
12
deps/buildcore/scripts/pybb.py
vendored
12
deps/buildcore/scripts/pybb.py
vendored
@ -31,9 +31,15 @@ def cat(paths: str) -> int:
|
||||
|
||||
|
||||
def mkdir(path: str) -> int:
|
||||
if not os.path.exists(path) and os.path.isdir(path):
|
||||
os.mkdir(path)
|
||||
return 0
|
||||
if not os.path.exists(path):
|
||||
try:
|
||||
os.mkdir(path)
|
||||
except:
|
||||
return 1
|
||||
return 0
|
||||
if os.path.isdir(path):
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
# this exists because Windows is utterly incapable of providing a proper rm -rf
|
||||
|
Reference in New Issue
Block a user