Skip to content

Commit 6877e1e

Browse files
committed
is_absolute: any size array
1 parent 272d279 commit 6877e1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

+stdlib/is_absolute.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
function y = is_absolute(p)
88
arguments
9-
p {mustBeTextScalar}
9+
p string
1010
end
11-
12-
% not Octave is_absolute_filename() because this is a stricter check for "c:" false
11+
% declare p string to avoid infinite recursion on stdlib.absolute('') on Windows
1312

1413
y = ~stdlib.strempty(stdlib.root_dir(p));
1514

1615
if ispc()
17-
y = y && ~stdlib.strempty(stdlib.root_name(p));
16+
y(y) = ~stdlib.strempty(stdlib.root_name(p(y)));
1817
end
1918

2019
end

0 commit comments

Comments
 (0)