bug fix the ls does not find the target file or folder
parent
5892695455
commit
eb8d0b29aa
|
@ -29,9 +29,16 @@ for indPC=1:length(Parallel),
|
||||||
if isunix || (~matlab_ver_less_than('7.4') && ismac),
|
if isunix || (~matlab_ver_less_than('7.4') && ismac),
|
||||||
if Parallel(indPC).Local==0,
|
if Parallel(indPC).Local==0,
|
||||||
[check, ax]=system(['ssh ',Parallel(indPC).user,'@',Parallel(indPC).PcName,' ls ',Parallel(indPC).RemoteFolder,'/',PRCDir,'/',filename]);
|
[check, ax]=system(['ssh ',Parallel(indPC).user,'@',Parallel(indPC).PcName,' ls ',Parallel(indPC).RemoteFolder,'/',PRCDir,'/',filename]);
|
||||||
|
if check ~ 0
|
||||||
|
ax=[];
|
||||||
|
end
|
||||||
else
|
else
|
||||||
ax=ls(filename);
|
try
|
||||||
|
ax=ls(filename);
|
||||||
|
catch
|
||||||
|
ax=[];
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
dirlist = [dirlist, ax];
|
dirlist = [dirlist, ax];
|
||||||
else
|
else
|
||||||
|
@ -40,6 +47,6 @@ for indPC=1:length(Parallel),
|
||||||
else
|
else
|
||||||
ax=ls(filename);
|
ax=ls(filename);
|
||||||
end
|
end
|
||||||
dirlist = [dirlist; ax];
|
dirlist = [dirlist; ax];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue