Skip to content

Commit 25b325e

Browse files
glenn-jochertdhooghe
authored andcommitted
Windows check_file() fix (ultralytics#7938)
Resolves Ultralytics HUB CI errors.
1 parent 48f6984 commit 25b325e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def check_file(file, suffix=''):
420420
if Path(file).is_file() or not file: # exists
421421
return file
422422
elif file.startswith(('http:/', 'https:/')): # download
423-
url = str(Path(file)).replace(':/', '://') # Pathlib turns :// -> :/
423+
url = file # warning: Pathlib turns :// -> :/
424424
file = Path(urllib.parse.unquote(file).split('?')[0]).name # '%2F' to '/', split https://url.com/file.txt?auth
425425
if Path(file).is_file():
426426
LOGGER.info(f'Found {url} locally at {file}') # file already exists

0 commit comments

Comments
 (0)