Skip to content

Commit ecc3375

Browse files
authored
Tidy up the directory reading (#13268)
1 parent fc9078a commit ecc3375

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/changes/devel/13268.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed bug where the file_id is not set when the file contains a directory at the end of the file, by `Théodore Papadopoulo`_.

mne/_fiff/tag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def _read_dir_entry_struct(fid, tag, shape, rlims):
363363
"""Read dir entry struct tag."""
364364
pos = tag.pos + 16
365365
entries = list()
366-
for offset in range(1, tag.size // 16):
366+
for offset in range(tag.size // 16):
367367
ent = _read_tag_header(fid, pos + offset * 16)
368368
# The position of the real tag on disk is stored in the "next" entry within the
369369
# directory, so we need to overwrite ent.pos. For safety let's also overwrite

0 commit comments

Comments
 (0)