Skip to content

Commit 188a245

Browse files
authored
Merge pull request #107 from mfschmidt/url_from_windows_path
FIX: Use Path.as_posix() and f-strinigs to build correct URLs on Windows
2 parents 9f5462b + 5a235f9 commit 188a245

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templateflow/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ def _s3_get(filepath):
291291
from tqdm import tqdm
292292
import requests
293293

294-
path = str(filepath.relative_to(TF_LAYOUT.root))
295-
url = "%s/%s" % (TF_S3_ROOT, path)
294+
path = filepath.relative_to(TF_LAYOUT.root).as_posix()
295+
url = f"{TF_S3_ROOT}/{path}"
296296

297297
print("Downloading %s" % url, file=stderr)
298298
# Streaming, so we can iterate over the response.

0 commit comments

Comments
 (0)