summaryrefslogtreecommitdiffstats
path: root/lib/filesystem.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-18 16:38:36 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-10-18 17:15:30 +0200
commit00ed2e87c9a1aa6f9ecd54ceaec4346250f6afca (patch)
tree3b0442897632cac9bf71d4de1cba6cad86877513 /lib/filesystem.php
parente4c0bb59e52a2cc7be21cdc4180a7f1aa64b18b5 (diff)
downloadnextcloud-server-00ed2e87c9a1aa6f9ecd54ceaec4346250f6afca.tar.gz
nextcloud-server-00ed2e87c9a1aa6f9ecd54ceaec4346250f6afca.zip
check for mount points if file was shared from a different user
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r--lib/filesystem.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index da524d7f181..5dc4b2f89e5 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -184,6 +184,12 @@ class OC_Filesystem{
* @return OC_Filestorage
*/
static public function getStorage($path) {
+ $user = ltrim(substr($path, 0, strpos($path, '/', 1)), '/');
+ // check mount points if file was shared from a different user
+ if ($user != OC_User::getUser()) {
+ OC_Util::loadMountPoints($user);
+ }
+
$mountpoint=self::getMountPoint($path);
if($mountpoint) {
if(!isset(OC_Filesystem::$storages[$mountpoint])) {