Skip to content

Commit 345feaf

Browse files
committed
create_symlink: fallback warning to build mex
Since system() call is not desirable and MEX is easy and fast
1 parent 01c1c19 commit 345feaf

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

+stdlib/create_symlink.m

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,9 @@
3232
% see example/Filesystem.java for this working in plain Java.
3333
% see example/javaCreateSymbolicLink.m for a non-working attempt in Matlab.
3434

35-
disp("'buildtool mex' for faster symlink creation")
35+
warning(e.identifier, "buildtool mex \n%s", e.message)
3636

37-
if ispc
38-
cmd = "pwsh -c " + '"' + "New-Item -ItemType SymbolicLink -Path " + link + ...
39-
" -Target " + target + '"';
40-
else
41-
cmd = "ln -s " + target + " " + link;
42-
end
43-
44-
% suppress output text on powershell
45-
[stat, ~] = system(cmd);
46-
47-
ok = stat == 0;
37+
ok = false;
4838
elseif strcmp(e.identifier, "Octave:undefined-function")
4939
[err, msg] = symlink(target, link);
5040
ok = err == 0;

0 commit comments

Comments
 (0)