fix webdav storage backend when trying to open a non existing file for reading

This commit is contained in:
Robin Appelman 2012-10-11 21:13:19 +02:00
parent 5256301a53
commit 5698c8519a
2 changed files with 6 additions and 3 deletions

View 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+');

View 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',