Skip to content

Commit

Permalink
full fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Aug 20, 2018
1 parent b0c56b9 commit fb7f731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mriqc/interfaces/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def _run_interface(self, runtime):
# Crawl back to the BIDS root
path = Path(self.inputs.in_file)
for i in range(1, 4):
bids_root = path.parents[i]
if str(bids_root).startswith('sub-'):
if str(path.parents[i].name).startswith('sub-'):
bids_root = path.parents[i + 1]
break

self._results['relative_path'] = str(path.relative_to(bids_root))
Expand Down

0 comments on commit fb7f731

Please sign in to comment.