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 48f6984 commit 25b325eCopy full SHA for 25b325e
utils/general.py
@@ -420,7 +420,7 @@ def check_file(file, suffix=''):
420
if Path(file).is_file() or not file: # exists
421
return file
422
elif file.startswith(('http:/', 'https:/')): # download
423
- url = str(Path(file)).replace(':/', '://') # Pathlib turns :// -> :/
+ url = file # warning: Pathlib turns :// -> :/
424
file = Path(urllib.parse.unquote(file).split('?')[0]).name # '%2F' to '/', split https://url.com/file.txt?auth
425
if Path(file).is_file():
426
LOGGER.info(f'Found {url} locally at {file}') # file already exists
0 commit comments