diff options
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/files_external/lib/config.php | 4 | ||||
-rw-r--r-- | apps/files_external/tests/mountconfig.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index de42fe2f755..aaa6c5be1a0 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -267,8 +267,8 @@ class OC_Mount_Config { $applicable, $isPersonal = false) { $mountPoint = OC\Files\Filesystem::normalizePath($mountPoint); - if ($mountPoint === '' || $mountPoint === '/') { - // can't mount at root + if ($mountPoint === '' || $mountPoint === '/' || $mountPoint == '/Shared') { + // can't mount at root or "Shared" folder return false; } if ($isPersonal) { diff --git a/apps/files_external/tests/mountconfig.php b/apps/files_external/tests/mountconfig.php index 77241c4dd2a..941aec680bb 100644 --- a/apps/files_external/tests/mountconfig.php +++ b/apps/files_external/tests/mountconfig.php @@ -44,6 +44,8 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase { $isPersonal = false; $this->assertEquals(false, OC_Mount_Config::addMountPoint('', $storageClass, array(), $mountType, $applicable, $isPersonal)); $this->assertEquals(false, OC_Mount_Config::addMountPoint('/', $storageClass, array(), $mountType, $applicable, $isPersonal)); + $this->assertEquals(false, OC_Mount_Config::addMountPoint('Shared', $storageClass, array(), $mountType, $applicable, $isPersonal)); + $this->assertEquals(false, OC_Mount_Config::addMountPoint('/Shared', $storageClass, array(), $mountType, $applicable, $isPersonal)); } } |