File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 99% need to have string array type for p(:)
1010
1111try
12+
1213 if isunix
1314 props = [" UserExecute" , " GroupExecute" , " OtherExecute" ];
1415 else
1516 props = " Readable" ;
1617 end
17- t = getPermissions(filePermissions(p ), props );
18- ok = isfile(p(: )) & any(t{: ,: }, 2 );
18+
19+ p = p(: );
20+ i = isfile(p );
21+ ok(size(p )) = false ;
22+ if ~any(i ), return , end
23+
24+ t(i , : ) = getPermissions(filePermissions(p(i )), props );
25+
26+ ok(i ) = isfile(p(i )) & any(t{i ,: }, 2 );
27+
1928catch e
2029 switch e .identifier
2130 case {' MATLAB:UndefinedFunction' , ' Octave:undefined-function' }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ function test_is_exe(tc, p)
1111
1212function test_matlab_exe(tc )
1313
14- f = fullfile(matlabroot , " bin" , " matlab" );
14+ f = fullfile(matlabroot , " bin/ matlab" );
1515if ispc()
1616 f = f + " .exe" ;
1717end
You can’t perform that action at this time.
0 commit comments