]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix webdav storage backend when trying to open a non existing file for reading
authorRobin Appelman <icewind@owncloud.com>
Thu, 11 Oct 2012 19:13:19 +0000 (21:13 +0200)
committerRobin Appelman <icewind@owncloud.com>
Thu, 11 Oct 2012 20:18:34 +0000 (22:18 +0200)
apps/files_external/lib/webdav.php
apps/files_external/tests/config.php

index 3c18b227fa6dc94eeb52f9d2ba839fe691b9a448..5e1858391588925a6617b0218a76a72cfe1bf602 100644 (file)
@@ -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+');
index 47dd7c4bf877efedaa4c5bfd33c922d0f9d8e55e..ff16b1c1d8a40bde6d3afa0f43ff45c90f3d2ab8 100644 (file)
@@ -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',