We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check_file()
1 parent 003fc3c commit a6b4a34Copy full SHA for a6b4a34
utils/general.py
@@ -419,7 +419,7 @@ def check_file(file, suffix=''):
419
if Path(file).is_file() or not file: # exists
420
return file
421
elif file.startswith(('http:/', 'https:/')): # download
422
- url = str(Path(file)).replace(':/', '://') # Pathlib turns :// -> :/
+ url = file # warning: Pathlib turns :// -> :/
423
file = Path(urllib.parse.unquote(file).split('?')[0]).name # '%2F' to '/', split https://url.com/file.txt?auth
424
if Path(file).is_file():
425
LOGGER.info(f'Found {url} locally at {file}') # file already exists
0 commit comments