File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1818arguments
1919 p (1 ,1 ) string
2020 expand_tilde (1 ,1 ) logical = true
21- use_java (1 ,1 ) logical = true
21+ use_java (1 ,1 ) logical = false
2222end
2323
2424if expand_tilde
3333end
3434
3535e = stdlib .exists(c );
36- if ~e && ~stdlib .has_java
37- % _canonicalizepath errors if path does not exist
38- return
39- end
4036
4137if ~stdlib .is_absolute(c )
4238 if e
5046 end
5147end
5248
53- if use_java && stdlib .has_java
54- % we use has_java check because default is use_java
49+ if use_java
5550 c = java .io .File(c ).getCanonicalPath();
56- else
57- % similar benchmark time as java method
51+ elseif e && ~startsWith( c , " ~ " )
52+ % errors if path does not exist. Errors on leading ~
5853 c = builtin(' _canonicalizepath' , c );
54+ else
55+ c = stdlib .normalize(c , use_java );
5956end
6057
6158c = stdlib .posix(c );
You can’t perform that action at this time.
0 commit comments