Skip to content

Commit 17bb171

Browse files
authored
Revert "Add directory existence check"
1 parent fa1892b commit 17bb171

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

tests/bids.spec.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,4 @@ var suite = describe('BIDS example datasets ', function() {
151151
isdone();
152152
});
153153
});
154-
155-
// test for directory path not existing
156-
it('checks for non-existing directory', function (isdone) {
157-
var options = {ignoreNiftiHeaders: true};
158-
validate.BIDS("path", options, function (issues) {
159-
assertErrorCode(issues.errors, '68');
160-
});
161-
isdone();
162-
});
163154
});

utils/issues/list.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,5 @@ module.exports = {
341341
key: 'NO_VALID_DATA_FOUND_FOR_SUBJECT',
342342
severity: 'error',
343343
reason: 'No BIDS compatible data found for at least one subject.'
344-
},
345-
68: {
346-
key: 'DIRECTORY_DOES_NOT_EXIST',
347-
severity: 'error',
348-
reason: 'Either wrong directory is choosen or there is an error in joining the path.'
349344
}
350345
};

validators/bids.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ BIDS = {
3131
* arguments to the callback.
3232
*/
3333
start: function (dir, options, callback) {
34-
if (fs.existsSync(dir)) {
3534
var self = BIDS;
3635
utils.options.parse(options, function (issues, options) {
3736
if (issues && issues.length > 0) {
@@ -61,18 +60,6 @@ BIDS = {
6160
});
6261
}
6362
});
64-
}else{
65-
var filename = path.basename(dir);
66-
var issue = new Issue({
67-
code: 68,
68-
file: {
69-
name: filename,
70-
path: path.join('.', filename),
71-
relativePath: path.join('', filename)
72-
}
73-
});
74-
return issue;
75-
}
7663
},
7764

7865
/*

0 commit comments

Comments
 (0)