11var utils = require ( '../utils' ) ;
22var Issue = utils . issues . Issue ;
33
4- function checkIfIntendedExists ( path , intendedForFile , fileList , issues , file ) {
5- var intendedForFileFull = "/" + path . split ( "/" ) [ 1 ] + "/" + intendedForFile ;
4+ function checkIfIntendedExists ( intendedForFile , fileList , issues , file ) {
5+ var intendedForFileFull = "/" + file . relativePath . split ( "/" ) [ 1 ] + "/" + intendedForFile ;
66 var onTheList = false ;
77
88 for ( var key2 in fileList ) {
@@ -15,9 +15,9 @@ function checkIfIntendedExists(path, intendedForFile, fileList, issues, file) {
1515 issues . push ( new Issue ( {
1616 file : file ,
1717 code : 37 ,
18- reason : "'IntendedFor' property of this fieldmap ('" + path +
18+ reason : "'IntendedFor' property of this fieldmap ('" + file . relativePath +
1919 "') does not point to an existing file('" + intendedForFile + "'). Please mind that this value should not include subject level directory " +
20- "('/" + path . split ( "/" ) [ 1 ] + "/')." ,
20+ "('/" + file . relativePath . split ( "/" ) [ 1 ] + "/')." ,
2121 evidence : intendedForFile
2222 } ) ) ;
2323 }
@@ -246,7 +246,7 @@ module.exports = function NIFTI (header, file, jsonContentsDict, bContentsDict,
246246
247247 for ( var key = 0 ; key < intendedFor . length ; key ++ ) {
248248 var intendedForFile = intendedFor [ key ] ;
249- checkIfIntendedExists ( path , intendedForFile , fileList , issues , file ) ;
249+ checkIfIntendedExists ( intendedForFile , fileList , issues , file ) ;
250250 }
251251 }
252252 }
0 commit comments