Skip to content

Commit

Permalink
BICAS: Bugfix: get_directory_DSMDs(): Assert directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikPGJ committed Feb 26, 2024
1 parent eca22ab commit 69395ac
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@

DsmdArray = solo.adm.DSMD.empty(0,1);
for i = 1:numel(dirPathsCa)
% Assert that directory exists.
% IMPLEMENTATION NOTE: dir(fullfile(dirPathsCa{i}, '**')) will NOT raise
% error for non-existing directory.
irf.assert.dir_exists(dirPathsCa{i})

DirOiArray = dir(fullfile(dirPathsCa{i}, '**'));
DirOiArray = DirOiArray(~[DirOiArray.isdir]);
dirFilesPathsCa = arrayfun(@(Oi) (fullfile(Oi.folder, Oi.name)), DirOiArray, 'UniformOutput', false);
DirOiArray = DirOiArray(:);
% CASE: DirOiArray is a column array.
dirFilesPathsCa = arrayfun(@(Oi) (fullfile(Oi.folder, Oi.name)), DirOiArray, 'UniformOutput', false);

[DirDsmdArray, bIsDataSetArray] = solo.adm.paths_to_DSMD_array(dirFilesPathsCa);
DirOiArray = DirOiArray(bIsDataSetArray);
Expand Down

0 comments on commit 69395ac

Please sign in to comment.