File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1717 switch e .identifier
1818 case " Octave:undefined-function" , r = readlink(p );
1919 case " MATLAB:UndefinedFunction"
20- if ~stdlib .is_symlink(p ), return , end
20+ if strempty(p ) || ~stdlib .is_symlink(p )
21+ return
22+ end
2123
2224 if stdlib .dotnet_api() >= 6
23- r = System .IO .FileInfo(p ).LinkTarget;
25+ r = string( System .IO .FileInfo(p ).LinkTarget) ;
2426 elseif stdlib .has_java()
2527 % must be absolute path
2628 % must not be .canonical or symlink is gobbled!
2729 r = stdlib .absolute(p );
2830 % https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#readSymbolicLink(java.nio.file.Path)
29- r = java .nio .file .Files .readSymbolicLink(javaPathObject(r )).string ;
31+ r = string( java .nio .file .Files .readSymbolicLink(javaPathObject(r ))) ;
3032 elseif stdlib .has_python()
3133 r = stdlib .python .read_symlink(p );
3234 end
3335 otherwise , rethrow(e )
3436 end
35- end
3637
37- if strempty(r )
38- r = stdlib .sys .read_symlink(p );
38+ if strempty(r ) && stdlib .exists(r )
39+ r = stdlib .sys .read_symlink(p );
40+ end
3941end
4042
4143end
You can’t perform that action at this time.
0 commit comments