[Pkg-owncloud-commits] [owncloud] 02/61: Fix remote share when remote server is installed at the root

David Prévot taffit at moszumanska.debian.org
Thu Jul 31 03:51:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 3c0f5d02bac478f028b74f4b488a3aa00b00feff
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Jul 23 13:45:56 2014 +0200

    Fix remote share when remote server is installed at the root
---
 apps/files_sharing/lib/external/storage.php | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index 3a0de51..855be28 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -49,7 +49,12 @@ class Storage extends DAV implements ISharedStorage {
 		$this->remote = $options['remote'];
 		$this->remoteUser = $options['owner'];
 		list($protocol, $remote) = explode('://', $this->remote);
-		list($host, $root) = explode('/', $remote, 2);
+		if (strpos($remote, '/')) {
+			list($host, $root) = explode('/', $remote, 2);
+		} else {
+			$host = $remote;
+			$root = '';
+		}
 		$secure = $protocol === 'https';
 		$root = rtrim($root, '/') . '/public.php/webdav';
 		$this->mountPoint = $options['mountpoint'];
@@ -148,7 +153,7 @@ class Storage extends DAV implements ISharedStorage {
 					// ownCloud instance is gone, likely to be a temporary server configuration error
 					throw $e;
 				}
-			} catch(\Exception $shareException) {
+			} catch (\Exception $shareException) {
 				// todo, maybe handle 403 better and ask the user for a new password
 				throw $e;
 			}

-- 
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