Skip to content

Commit 5182a1a

Browse files
author
Mantas Mikaitis
committed
Bugfix
1 parent e4d596e commit 5182a1a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

anymatrix.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,15 @@
317317
% Check dir is not current or previous directories '.' and '..',
318318
% and check dir has two files additionally to '.' and '..'.
319319
if (any(strcmp(directory, {'.', '..'})) || ...
320-
(length(dir(directory))) ~= 4)
320+
(length(dir(strcat(root_path, '/', directory)))) ~= 4)
321321
out = false;
322322
else
323323
% Check dir has a 'private' directory and a file
324324
% anymatrix_<dir_name>.
325-
out = ~(isempty(dir(strcat(directory, '/private/'))) || ...
326-
isempty(dir( ...
327-
strcat(directory, '/anymatrix_', directory, '.m'))));
325+
out = ~(isempty(dir(strcat(root_path, '/', directory, ...
326+
'/private/'))) || ...
327+
isempty(dir(strcat(root_path, '/', directory, ...
328+
'/anymatrix_', directory, '.m'))));
328329
end
329330
end
330331

0 commit comments

Comments
 (0)