diff --git a/sat/tools/common/files_utils.py b/sat/tools/common/files_utils.py index 64f8b42c..a31771e2 100644 --- a/sat/tools/common/files_utils.py +++ b/sat/tools/common/files_utils.py @@ -27,7 +27,7 @@ def get_unique_name(path): @param path(str, Path): path to the file to create @return (Path): unique path (can be the same as path if there is no conflict) """ - ori_path = Path(path) + ori_path = path = Path(path) idx = 1 while path.exists(): path = ori_path.with_name(ori_path.name + f"_{idx}")