Skip to content

Commit a6b4a34

Browse files
glenn-jocherClay Januhowski
authored andcommitted
Windows check_file() fix (ultralytics#7938)
Resolves Ultralytics HUB CI errors.
1 parent 003fc3c commit a6b4a34

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
@@ -419,7 +419,7 @@ def check_file(file, suffix=''):
419419
if Path(file).is_file() or not file: # exists
420420
return file
421421
elif file.startswith(('http:/', 'https:/')): # download
422-
url = str(Path(file)).replace(':/', '://') # Pathlib turns :// -> :/
422+
url = file # warning: Pathlib turns :// -> :/
423423
file = Path(urllib.parse.unquote(file).split('?')[0]).name # '%2F' to '/', split https://url.com/file.txt?auth
424424
if Path(file).is_file():
425425
LOGGER.info(f'Found {url} locally at {file}') # file already exists

0 commit comments

Comments
 (0)