Skip to content

Commit 853e09e

Browse files
committed
replacing forbidden chars
1 parent fe31dc3 commit 853e09e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def execute(self):
140140

141141

142142
class DownloadExportUseCase(BaseReportableUseCase):
143+
FORBIDDEN_CHARS = "*./\[]:;|,\"\'"
143144
def __init__(
144145
self,
145146
service_provider: BaseServiceProvider,
@@ -205,6 +206,8 @@ def download_to_local_storage(self, destination: str, extract_zip=False):
205206
time.sleep(1)
206207
self.reporter.stop_spinner()
207208
filename = Path(export["path"]).name
209+
for char in DownloadExportUseCase.FORBIDDEN_CHARS:
210+
filename.replace(char, "_")
208211
filepath = Path(destination) / filename
209212
with requests.get(export["download"], stream=True) as response:
210213
response.raise_for_status()

0 commit comments

Comments
 (0)