Fixed creation of empty directories in path was entered mistaken (#11174)

FFixed creation of empty directories in path was entered mistaken

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
imyhxy 2023-03-24 03:27:46 +08:00 committed by GitHub
parent 78a90c9661
commit d223460f3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,8 +118,8 @@ def attempt_download(file, repo='ultralytics/yolov5', release='v7.0'):
except Exception:
tag = release
file.parent.mkdir(parents=True, exist_ok=True) # make parent dir (if required)
if name in assets:
file.parent.mkdir(parents=True, exist_ok=True) # make parent dir (if required)
safe_download(file,
url=f'https://github.com/{repo}/releases/download/{tag}/{name}',
min_bytes=1E5,