RegTest: Fix directory creation always failing

This commit is contained in:
Stenzek
2023-11-25 20:06:30 +10:00
parent ff17444074
commit dc75afeb3d
2 changed files with 86 additions and 61 deletions

View File

@ -33,7 +33,10 @@ def run_regression_tests(runner, gamedir, destdir, dump_interval, frames, parall
paths = glob.glob(gamedir + "/*.*", recursive=True)
gamepaths = list(filter(is_game_path, paths))
if not os.path.isdir(destdir) and not os.mkdir(destdir):
try:
if not os.path.isdir(destdir):
os.mkdir(destdir)
except OSError:
print("Failed to create directory")
return False