Skip to content

Commit 0d6b837

Browse files
nellhsappelhoff
authored andcommitted
Support Windows paths in readDir.wqpreprocessNode
1 parent 562248c commit 0d6b837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bids-validator/utils/files/readDir.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function harmonizeRelativePath(path) {
9595
* 3. Harmonizes the 'relativePath' field
9696
*/
9797
function preprocessNode(dir, ig, options) {
98-
var str = dir.substr(dir.lastIndexOf('/') + 1) + '$'
98+
var str = dir.substr(dir.lastIndexOf(path.sep) + 1) + '$'
9999
var rootpath = dir.replace(new RegExp(str), '')
100100
return getFiles(dir, rootpath, ig, options)
101101
}

0 commit comments

Comments
 (0)