From 378fa2bc86fd5df095b2d05855bd54a341dba1b0 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Thu, 5 Jul 2012 12:17:33 +0200
Subject: [PATCH] check if caview really exists

---
 .htaccess                          | 4 ++--
 apps/files_external/lib/webdav.php | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.htaccess b/.htaccess
index 11ee1d59f83..6d1844dbf9c 100755
--- a/.htaccess
+++ b/.htaccess
@@ -1,8 +1,8 @@
 ErrorDocument 403 /core/templates/403.php
 ErrorDocument 404 /core/templates/404.php
 <IfModule mod_php5.c>
-php_value upload_max_filesize 513M
-php_value post_max_size 513M
+php_value upload_max_filesize 2000M
+php_value post_max_size 2000M
 php_value memory_limit 512M
 <IfModule env_module>
   SetEnv htaccessWorking true
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 097ff3c0162..32dd26ae6c3 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -36,8 +36,10 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
 			$this->root.='/';
 		}
 		
-		$caview = \OCP\Files::getStorage('files_external');
-		$capath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("");
+		$capath = '';
+		if($caview = \OCP\Files::getStorage('files_external')) {
+			$capath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("");
+		}
 		$settings = array(
 			'baseUri' => $this->createBaseUri(),
 			'userName' => $this->user,
-- 
GitLab