get_function_path : anomaly with Scilab 6
Reported by Alain Lamy
Originally assigned to Charlotte HECQUET
BUG DESCRIPTION:
----------------
Anomaly with get_function_path: missing file separator.
The result is for instance:
get_function_path("myfun")
=> D:\users\...\TESTmyfun.sci
(if TEST is the name of the directory where myfun.sci is)
ERROR LOG:
----------
none
OTHER INFORMATION:
------------------
tested with: scilab-branch-YaSp-1432904838 (1 june 2015) - Windows 32 bits
Solution: add "fullfile" line 23 of "get_function_path" so that the path is always correct.
[this can be done with all Scilab versions]
(function excerpt)
function path = get_function_path(name)
...
libname = whereis(name);
if libname <> [] then
for i = 1:size(libname,"*")
[funcnames, pathlib] = libraryinfo(libname(i));
path = [path ; fullfile(pathlib, name + ".sci")]; // <=====
end
path = pathconvert(path,%F);
end
endfunction