Skip to content

Commit 8481622

Browse files
committed
don't emit warnings, pass CI
1 parent 840a17b commit 8481622

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

+stdlib/+fileio/create_symlink.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
% the above should work, but Matlab Java doesn't recognize the optional argument omitted.
1414

1515
if stdlib.fileio.exists(link)
16-
warning("link %s already exists", link)
1716
ok = false;
1817
return
1918
end

+stdlib/+fileio/read_symlink.m

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88
import java.nio.file.Files
99

1010
r = stdlib.fileio.absolute_path(p);
11-
if ~stdlib.fileio.exists(r)
12-
warning("%s does not exist", r)
13-
r = string.empty;
14-
return
15-
end
16-
if ~stdlib.fileio.is_symlink(r)
17-
warning("%s is not a symlink", r)
11+
if ~stdlib.fileio.exists(r) || ~stdlib.fileio.is_symlink(r)
1812
r = string.empty;
1913
return
2014
end

+stdlib/+fileio/windows_shortname.m

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,15 @@
1616
short = "";
1717

1818
if ~ispc
19-
warning('Only available on Windows')
2019
return
2120
end
2221

2322
fso = actxserver('Scripting.FileSystemObject');
2423

2524
if isfolder(p)
26-
short = fso.GetFolder(p).ShortPath;
25+
short = fso.GetFolder(p).ShortPath;
2726
elseif isfile(p)
28-
short = fso.GetFile(p).ShortPath;
29-
else
30-
warning('%s is not folder or file', p);
27+
short = fso.GetFile(p).ShortPath;
3128
end
3229

3330
short = string(short);

0 commit comments

Comments
 (0)