Skip to content

Commit a2bdfcf

Browse files
committed
Merge branch 'development', v1.87.0
-- Fix bug saving wrong format indicating what folder format is associated with saved dataset. This leads to not finding ANY data files when reloading dataset next time Homer is launched. To reproduce comment out the fix and add ONE "error" snirf file (such as probe.snirf) which will not be loaded AND are in a different folder format than the valid dataset. Exit Homer and restart it. Homer will not find ANY data files when relaunching.
2 parents a6b592d + 1d6a92a commit a2bdfcf

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

DataTree/AcquiredData/DataFiles/DataFilesClass.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,15 @@ function GetDataSet(obj, skipsaveddata)
318318
if ~isempty(obj.files)
319319
break
320320
end
321-
end
321+
322+
% If we're here it means we still have not found a valid dataset in any of the formats looked
323+
% at so far, but obj.dirFormats.type may have been set to non-zero because a invalid dataset
324+
% may have been found by obj.FindDataSet() then flagged as invalid by obj.ErrorCheck(). So make
325+
% sure to reset format type here otherwise wrong format could be associated with saved dataset.
326+
% To reproduce comment out this fix and add ONE error snirf file that does NOT belong in the
327+
% dataset due to being in incompatible format folder structure. BUG FIX: Jay Dubb, May 8, 2024
328+
obj.dirFormats.type = 0;
329+
end
322330
if strcmp(mode,'noerrorcheck')
323331
return
324332
end

DataTree/Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.21.1
1+
1.22.0

Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.86.0
1+
1.87.0

0 commit comments

Comments
 (0)