summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-11 21:13:19 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-11 22:18:34 +0200
commit5698c8519ad48e9ffa4497e8ce951888922903c3 (patch)
treef4e13aef00a19f27fbf9f8ab7718cf4808afd1d8 /apps/files_external
parent5256301a536f4308c0de6ff7e2494df98336d259 (diff)
downloadnextcloud-server-5698c8519ad48e9ffa4497e8ce951888922903c3.tar.gz
nextcloud-server-5698c8519ad48e9ffa4497e8ce951888922903c3.zip
fix webdav storage backend when trying to open a non existing file for reading
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/webdav.php3
-rw-r--r--apps/files_external/tests/config.php6
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 3c18b227fa6..5e185839158 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -131,6 +131,9 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
switch($mode) {
case 'r':
case 'rb':
+ if(!$this->file_exists($path)) {
+ return false;
+ }
//straight up curl instead of sabredav here, sabredav put's the entire get result in memory
$curl = curl_init();
$fp = fopen('php://temp', 'r+');
diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php
index 47dd7c4bf87..ff16b1c1d8a 100644
--- a/apps/files_external/tests/config.php
+++ b/apps/files_external/tests/config.php
@@ -8,7 +8,7 @@ return array(
'root'=>'/test',
),
'webdav'=>array(
- 'run'=>true,
+ 'run'=>false,
'host'=>'localhost',
'user'=>'test',
'password'=>'test',
@@ -26,11 +26,11 @@ return array(
'run'=>false,
'user'=>'test:tester',
'token'=>'testing',
- 'host'=>'ubuntu.local:8080/auth',
+ 'host'=>'localhost.local:8080/auth',
'root'=>'/',
),
'smb'=>array(
- 'run'=>true,
+ 'run'=>false,
'user'=>'test',
'password'=>'test',
'host'=>'localhost',