summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-10-01 22:18:03 +0200
committerRobin Appelman <icewind@owncloud.com>2013-10-01 22:18:03 +0200
commitea6115bfaa6f8598da727dfacbcf093578149d9d (patch)
tree1685d83d3d0b08dc0e947346dfaba07492be07cc /apps/files_external/3rdparty
parent5ade595911261cf47cdad17deb4d1a013f523245 (diff)
downloadnextcloud-server-ea6115bfaa6f8598da727dfacbcf093578149d9d.tar.gz
nextcloud-server-ea6115bfaa6f8598da727dfacbcf093578149d9d.zip
fix smb streamwrapper on non existing files
Diffstat (limited to 'apps/files_external/3rdparty')
-rw-r--r--apps/files_external/3rdparty/smb4php/smb.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_external/3rdparty/smb4php/smb.php b/apps/files_external/3rdparty/smb4php/smb.php
index e7d1dfa09fe..aec181a3509 100644
--- a/apps/files_external/3rdparty/smb4php/smb.php
+++ b/apps/files_external/3rdparty/smb4php/smb.php
@@ -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+':