[Copy Files][Fixed] Warnings when using the STEP and WRL files

The code tried to add their counterpart, that was already used,
generating a repetition
This commit is contained in:
Salvador E. Tropea 2023-11-23 10:50:33 -03:00
parent 2581c84d09
commit 46c1ff5dd1
1 changed files with 2 additions and 2 deletions

View File

@ -146,11 +146,11 @@ class Copy_FilesOptions(Base3DOptions):
for fn in files_list:
if fn.endswith('.wrl'):
fn = fn[:-4]+'.step'
if os.path.isfile(fn):
if os.path.isfile(fn) and fn not in files_list:
new_list.append(fn)
elif fn.endswith('.step'):
fn = fn[:-5]+'.wrl'
if os.path.isfile(fn):
if os.path.isfile(fn) and fn not in files_list:
new_list.append(fn)
return files_list+fnmatch.filter(new_list, f.source)