[Pkg-owncloud-commits] [owncloud] 15/67: fix webdav storage backend when trying to open a non existing file for reading
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:10:32 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.1
in repository owncloud.
commit 85e236d7988e371e6b8d7f4b7bfc7ecb96196b3f
Author: Robin Appelman <icewind at owncloud.com>
Date: Thu Oct 11 21:13:19 2012 +0200
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 3c18b22..5e18583 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 47dd7c4..ff16b1c 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',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list