Skip to content

Commit 23463de

Browse files
committed
Fix relative glob paths
1 parent e0caf38 commit 23463de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/napari_deeplabcut/_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def read_images(path):
8989
# Retrieve filepaths exactly as parsed by pims
9090
filepaths = []
9191
for filepath in glob.iglob(path):
92-
_, *relpath = filepath.rsplit(os.sep, 3)
92+
relpath = Path(filepath).parts[-3:]
9393
filepaths.append(os.path.join(*relpath))
9494
params = {
9595
"name": "images",

0 commit comments

Comments
 (0)