Update stream_loaders.py to `Path().absolute()` (#2915)

single_channel
Glenn Jocher 2 years ago committed by GitHub
parent fd94d312da
commit 90ec434ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -156,7 +156,7 @@ class LoadImages:
path = Path(path).read_text().rsplit() path = Path(path).read_text().rsplit()
files = [] files = []
for p in sorted(path) if isinstance(path, (list, tuple)) else [path]: for p in sorted(path) if isinstance(path, (list, tuple)) else [path]:
p = str(Path(p).resolve()) p = str(Path(p).absolute()) # do not use .resolve() https://github.com/ultralytics/ultralytics/issues/2912
if '*' in p: if '*' in p:
files.extend(sorted(glob.glob(p, recursive=True))) # glob files.extend(sorted(glob.glob(p, recursive=True))) # glob
elif os.path.isdir(p): elif os.path.isdir(p):

Loading…
Cancel
Save