Only create target folder if source folder exists
build.sh returns without errors even if there it does not generate a .bin file this is a slight improvement on the existing fix
This commit is contained in:
parent
005aafd2de
commit
8e881ad5a7
|
@ -308,11 +308,11 @@ def build_binary_for_navigation(package_name, dirname, maps):
|
|||
target_name,
|
||||
"Nav")
|
||||
|
||||
if not os.path.exists(nav_folder_target):
|
||||
os.makedirs(nav_folder_target)
|
||||
|
||||
nav_path_source = os.path.join(folder, "%s.bin" % target_name)
|
||||
if os.path.exists(nav_path_source):
|
||||
# Skip this step for maps that do not use ped navmesh
|
||||
if not os.path.exists(nav_folder_target):
|
||||
os.makedirs(nav_folder_target)
|
||||
nav_path_target = os.path.join(nav_folder_target, "%s.bin" % target_name)
|
||||
print('Copying "' + nav_path_source + '" to "' + nav_path_target + '"')
|
||||
shutil.copy2(nav_path_source, nav_path_target)
|
||||
|
|
Loading…
Reference in New Issue