diff --git a/kibot/out_copy_files.py b/kibot/out_copy_files.py index fbb8fd9c..b7e4df94 100644 --- a/kibot/out_copy_files.py +++ b/kibot/out_copy_files.py @@ -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)