Skip to content

Commit b9b9a2a

Browse files
Narek MkhitaryanNarek Mkhitaryan
authored andcommitted
fix download_export file nameing
1 parent ea7f01d commit b9b9a2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/superannotate/lib/core/usecases/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ def download_to_local_storage(self, destination: str, extract_zip=False):
210210
raise AppException("Couldn't download export.")
211211
time.sleep(1)
212212
self.reporter.stop_spinner()
213-
filename = Path(export["path"]).stem
213+
filename = export["name"]
214214
if platform.system().lower() == "windows":
215215
for char in DownloadExportUseCase.FORBIDDEN_CHARS:
216216
filename = filename.replace(char, "_")
217-
filepath = Path(destination) / (filename + ".zip")
217+
filepath = Path(destination) / filename
218218
with requests.get(export["download"], stream=True) as response:
219219
response.raise_for_status()
220220
with open(filepath, "wb") as f:

0 commit comments

Comments
 (0)