fix smb streamwrapper on non existing files
This commit is contained in:
parent
5ade595911
commit
ea6115bfaa
1 changed files with 6 additions and 1 deletions
7
apps/files_external/3rdparty/smb4php/smb.php
vendored
7
apps/files_external/3rdparty/smb4php/smb.php
vendored
|
@ -181,6 +181,8 @@ class smb {
|
|||
return false;
|
||||
}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_PATH_NOT_FOUND'){
|
||||
return false;
|
||||
}elseif(substr($regs[0],0,31)=='NT_STATUS_OBJECT_NAME_NOT_FOUND'){
|
||||
return false;
|
||||
}elseif(substr($regs[0],0,29)=='NT_STATUS_FILE_IS_A_DIRECTORY'){
|
||||
return false;
|
||||
}
|
||||
|
@ -430,7 +432,10 @@ class smb_stream_wrapper extends smb {
|
|||
case 'rb':
|
||||
case 'a':
|
||||
case 'a+': $this->tmpfile = tempnam('/tmp', 'smb.down.');
|
||||
smb::execute ('get "'.$pu['path'].'" "'.$this->tmpfile.'"', $pu);
|
||||
$result = smb::execute ('get "'.$pu['path'].'" "'.$this->tmpfile.'"', $pu);
|
||||
if($result === false){
|
||||
return $result;
|
||||
}
|
||||
break;
|
||||
case 'w':
|
||||
case 'w+':
|
||||
|
|
Loading…
Reference in a new issue