Skip to content

Commit

Permalink
fix(windows): Replace backslashes with forward slashes for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed May 10, 2024
1 parent 5251d85 commit a22052f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bids-validator/bids_validator/bids_validator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Validation class for BIDS projects."""
import logging
import os
import re
from functools import lru_cache
from itertools import chain
Expand Down Expand Up @@ -134,6 +135,9 @@ def parse(cls, path):
if cls.regexes is None:
cls._init_regexes()

if path.startswith(os.sep):
path = path.replace(os.sep, '/')

if not path.startswith('/'):
raise ValueError("Path must be relative to root of a BIDS dataset,"
" and must include a leading forward slash `/`.")
Expand Down

0 comments on commit a22052f

Please sign in to comment.