Skip to content

Commit c12beb7

Browse files
committed
canonical: correct behavior for use_java=true
1 parent 0fc96d9 commit c12beb7

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

+stdlib/canonical.m

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
c = p;
2828
end
2929

30-
if ~stdlib.len(c)
31-
return
32-
end
33-
3430
if ispc && strncmp(c, "\\", 2)
3531
% UNC path is not canonicalized
3632
return
@@ -43,16 +39,7 @@
4339
% errors if path does not exist. Errors on leading ~
4440
c = builtin('_canonicalizepath', c);
4541
end
46-
47-
c = stdlib.posix(c);
48-
return
49-
end
50-
51-
% like C++ filesystem weakly_canonical()
52-
53-
if use_java
54-
c = javaFileObject(c).getCanonicalPath();
55-
else
42+
elseif stdlib.len(c)
5643
c = stdlib.normalize(c, use_java);
5744
end
5845

0 commit comments

Comments
 (0)