Skip to content

Commit 6834457

Browse files
committed
sort by name and not by file path
1 parent d9c96b0 commit 6834457

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neo/rawio/neuralynxrawio/neuralynxrawio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ def _parse_header(self):
231231
else: # one-dir mode
232232
# For one-dir mode, get all files from directory
233233
dir_path = Path(self.dirname)
234-
file_paths = [item for item in sorted(dir_path.iterdir()) if item.is_file()]
234+
file_paths = [p for p in dir_path.iterdir() if p.is_file()]
235+
file_paths = sorted(file_paths, key=lambda p: p.name)
235236

236237
# 2) Filter by exclude filenames
237238
file_paths = [fp for fp in file_paths if fp.name not in self.exclude_filenames]

0 commit comments

Comments
 (0)