From 5698c8519ad48e9ffa4497e8ce951888922903c3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 11 Oct 2012 21:13:19 +0200 Subject: [PATCH] fix webdav storage backend when trying to open a non existing file for reading --- apps/files_external/lib/webdav.php | 3 +++ apps/files_external/tests/config.php | 6 +++--- 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', -- 2.39.5