Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-12-29 22:43:44 +0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-12-29 22:43:44 +0400
commitd275725e233092f21247a62bde3e46a352d5a1b5 (patch)
treeff72b4977e4bed8bd0b853091216a87713ecfc4f
parentcfc3526b25f1b96ab7a989f1c89f5b3911bc18fc (diff)
No longer need to create folders locally for external storage mount points
-rwxr-xr-xapps/files_external/lib/config.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 0e0bc56ad0e..323e4060a43 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -179,22 +179,6 @@ class OC_Mount_Config {
}
/**
- * Add directory for mount point to the filesystem
- * @param OC_Fileview instance $view
- * @param string path to mount point
- */
- private static function addMountPointDirectory($view, $path) {
- $dir = '';
- foreach ( explode('/', $path) as $pathPart) {
- $dir = $dir.'/'.$pathPart;
- if ( !$view->file_exists($dir)) {
- $view->mkdir($dir);
- }
- }
- }
-
-
- /**
* Add a mount point to the filesystem
* @param string Mount point
* @param string Backend class
@@ -216,33 +200,8 @@ class OC_Mount_Config {
if ($applicable != OCP\User::getUser() || $class == '\OC\Files\Storage\Local') {
return false;
}
- $view = new \OC\Files\View('/'.OCP\User::getUser().'/files');
- self::addMountPointDirectory($view, ltrim($mountPoint, '/'));
$mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/');
} else {
- $view = new \OC\Files\View('/');
- switch ($mountType) {
- case 'user':
- if ($applicable == "all") {
- $users = OCP\User::getUsers();
- foreach ( $users as $user ) {
- $path = $user.'/files/'.ltrim($mountPoint, '/');
- self::addMountPointDirectory($view, $path);
- }
- } else {
- $path = $applicable.'/files/'.ltrim($mountPoint, '/');
- self::addMountPointDirectory($view, $path);
- }
- break;
- case 'group' :
- $groupMembers = OC_Group::usersInGroups(array($applicable));
- foreach ( $groupMembers as $user ) {
- $path = $user.'/files/'.ltrim($mountPoint, '/');
- self::addMountPointDirectory($view, $path);
- }
- break;
- }
-
$mountPoint = '/$user/files/'.ltrim($mountPoint, '/');
}
$mount = array($applicable => array($mountPoint => array('class' => $class, 'options' => $classOptions)));