Skip to content

Commit d0004f3

Browse files
committed
relative: simplify
1 parent 5dd5906 commit d0004f3

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

+stdlib/relative_to.m

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,7 @@
2525
b = javaPathObject(b1);
2626
o = javaPathObject(o1);
2727

28-
try
29-
w = contains(b1, "..");
30-
catch e
31-
if strcmp(e.identifier, "Octave:undefined-function")
32-
w = ~isempty(strfind(b1, "..")); %#ok<STREMP>
33-
else
34-
rethrow(e);
35-
end
36-
end
37-
38-
if w
28+
if ~isempty(strfind(b1, "..")) %#ok<STREMP>
3929
warning("relative_to(%s) is ambiguous base with '..' consider using stdlib.canonical() first", b1)
4030
end
4131

0 commit comments

Comments
 (0)