Skip to content

Commit

Permalink
Merge pull request #107 from mfschmidt/url_from_windows_path
Browse files Browse the repository at this point in the history
FIX: Use Path.as_posix() and f-strinigs to build correct URLs on Windows
  • Loading branch information
effigies authored Oct 12, 2023
2 parents 9f5462b + 5a235f9 commit 188a245
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templateflow/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ def _s3_get(filepath):
from tqdm import tqdm
import requests

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

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

0 comments on commit 188a245

Please sign in to comment.