Fix NCNN export on Windows (#11719)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-05-07 08:58:08 +02:00 committed by GitHub
parent b617e131bd
commit 537c50e45f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 9 deletions

View file

@ -528,7 +528,7 @@ def check_is_path_safe(basedir, path):
base_dir_resolved = Path(basedir).resolve()
path_resolved = Path(path).resolve()
return path_resolved.is_file() and path_resolved.parts[: len(base_dir_resolved.parts)] == base_dir_resolved.parts
return path_resolved.exists() and path_resolved.parts[: len(base_dir_resolved.parts)] == base_dir_resolved.parts
def check_imshow(warn=False):

View file

@ -418,7 +418,7 @@ def attempt_download_asset(file, repo="ultralytics/assets", release="v8.2.0", **
Example:
```python
file_path = attempt_download_asset('yolov5s.pt', repo='ultralytics/assets', release='latest')
file_path = attempt_download_asset('yolov8n.pt', repo='ultralytics/assets', release='latest')
```
"""
from ultralytics.utils import SETTINGS # scoped for circular import