Open crisglav opened 1 month ago
@dungscout96 can you have a look. This is code you recently added I think.
specifically this part:
% if ~isTopLevel(curFile)
% upperFile = fullfile(fileparts(fileparts(curFile)), ['*' ext]);
% % resolve wildcard if applicable
% upperFileDir = dir(upperFile);
% if ~isempty(upperFileDir)
% for u=1:numel(upperFileDir)
% % check using rule 2.b and 2.c
% % of https://bids-specification.readthedocs.io/en/stable/common-principles.html#the-inheritance-principle
% upperFileName = upperFileDir(u).name;
% upperFileNameparts = strsplit(upperFileName, '');
% if contains(oriFile, upperFileName_parts)
% upperFile = fullfile(upperFileDir(u).folder, upperFileDir(u).name);
% break
% end
% end
% end
% upperjsondata = bids_importjson(upperFile, ext, oriFile);
%
% % mergeStructures credit: https://www.mathworks.com/matlabcentral/fileexchange/131718-mergestructures-merge-or-concatenate-nested-structures?s_tid=mwa_osa_a
% curjsondata = mergeStructures(curjsondata, upperjsondata);
% end
Hi, when I run pop_importbids, it gets in a never ending loop in line 468, when calling bids_importjson.
I think it has to do with this part of the code.
https://github.com/sccn/EEG-BIDS/blob/bf6001cce2cc64cc28124cf15f185b9314402eb5/bids_importjson.m#L40C4-L55C12
Best, Cristina