Skip to content

Commit

Permalink
Fix incorrectly-defined private readdir() used when shimming a Matlab…
Browse files Browse the repository at this point in the history
… version.

Fixes #6.
  • Loading branch information
apjanke committed Jun 16, 2022
1 parent 03a78e7 commit f80e15c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Mcode/+logger/+internal/LibraryInitializer.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ function initLibrary()

end

function out = readdir(pth)
d = dir(pth);
d(ismember({d.name}, {'.','..'})) = [];
out = {d.name};
end

end

end
Expand Down
8 changes: 8 additions & 0 deletions Mcode/+logger/+internal/private/readdir.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function out = readdir(pth)
% A slightly better version of Matlab's DIR function.
%
% Returns just the names of directory entries, and excludes "." and "..".
d = dir(pth);
d(ismember({d.name}, {'.','..'})) = [];
out = {d.name};
end

0 comments on commit f80e15c

Please sign in to comment.