Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cli/src/etos_client/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ def __save_file(self, item: Downloadable, response: requests.Response) -> None:
with self.__lock:
download_path.parent.mkdir(exist_ok=True, parents=True)
index = 0
original_name = download_path.name
while download_path.exists():
index += 1
download_path = download_path.with_name(f"{index}_{download_path.name}")
download_path = download_path.with_name(f"{index}_{original_name}")
self.logger.debug("Saving file %s", download_path)
with self.__lock:
self.downloads.add(str(download_path))
Expand Down