We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b51d163 commit b5784b1Copy full SHA for b5784b1
+stdlib/+fileio/which.m
@@ -19,20 +19,16 @@
19
end
20
21
22
-%% directory/filename given
23
-for name = names
+% directory/filename given
+for exe = names
24
25
- if strlength(fileparts(name)) > 0
26
- % has directory part
27
- if stdlib.fileio.is_exe(name)
28
- exe = name;
29
- return
30
- end
+ if strlength(fileparts(exe)) > 0 && stdlib.fileio.is_exe(exe)
+ return
31
32
33
end % for name
34
35
-%% path given
+% path given
36
37
if isscalar(fpath)
38
fpath = split(stdlib.fileio.expanduser(fpath), pathsep).';
0 commit comments