Skip to content

Commit

Permalink
fix: correct path separator issue in extract_source_from_url function…
Browse files Browse the repository at this point in the history
… for Windows compatibility
  • Loading branch information
areebahmeddd committed Nov 2, 2024
1 parent 4bff046 commit 50f7562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openfoodfacts/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def extract_source_from_url(url: str) -> str:
if url_path.endswith(".json"):
url_path = str(Path(url_path).with_suffix(".jpg"))

return url_path
return url_path.replace("\\", "/")


def download_image(
Expand Down

0 comments on commit 50f7562

Please sign in to comment.