File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 1616
1717
1818if stdlib .isoctave()
19- n = stdlib .posix(javaObject(" java.io.File" , p ).toPath().normalize().toString());
19+ o = javaObject(" java.io.File" , p ).toPath().normalize();
20+ n = jPosix(o );
2021elseif use_java
21- n = stdlib .posix(java .io .File(p ).toPath().normalize().toString());
22+ o = java .io .File(p ).toPath().normalize();
23+ n = jPosix(o );
2224else
2325
24- n = stdlib .posix(string( p ) );
26+ n = stdlib .posix(p );
2527
2628 % use split to remove /../ and /./ and duplicated /
2729 parts = split(n , ' /' );
Original file line number Diff line number Diff line change 3333end
3434
3535try
36- r = b .relativize(o ).toString( );
36+ r = jPosix( b .relativize(o ));
3737catch e
3838 r = " " ;
3939 if stdlib .isoctave()
4747 end
4848end
4949
50- if isstring(b1 )
51- r = string(r );
52- end
53-
54- r = stdlib .posix(r );
55-
5650end
5751
5852% !assert(relative_to("/a/b", "/a/b"), ".")
You can’t perform that action at this time.
0 commit comments