py api: path_reference_copy() use try/except when copying images, can fail for odd reasons (currently fails if the dest dir is a symlink and not using expected permissions).
This commit is contained in:
@@ -436,8 +436,18 @@ def path_reference_copy(copy_set, report=print):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
dir_to = os.path.dirname(file_dst)
|
dir_to = os.path.dirname(file_dst)
|
||||||
os.makedirs(dir_to, exist_ok=True)
|
|
||||||
shutil.copy(file_src, file_dst)
|
try:
|
||||||
|
os.makedirs(dir_to, exist_ok=True)
|
||||||
|
except:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
|
try:
|
||||||
|
shutil.copy(file_src, file_dst)
|
||||||
|
except:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
|
|
||||||
def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."):
|
def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."):
|
||||||
|
|||||||
Reference in New Issue
Block a user