Skip to content

BIDSPath.match() can return duplicates (and files that don't exist) #1561

@larsoner

Description

@larsoner

See

https://github.com/mne-tools/mne-bids/pull/1560/changes#diff-fa823e8c258bfc63ca666a1954e56b00ceb6816e16fecef3ba6cbffaa33de9b0R326

Where it returns hundreds of values when there are only 36 unique ones. This is due to finding paths like

a/b/something
a/c/something

in the initial scan and then replacing them with

bids_root/something
bids_root/something

I am not sure the correct fix here... deduplication is possible, but it's weird because the a/b and a/c are being replaced with bids_root so the bids_root/something file might not actually even exist in the end!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions