external storages: allow to mount a folder called "Shared", it is no longer a reserved name
This commit is contained in:
parent
c9bd2f7a6c
commit
22e0a4b9a8
|
@ -373,8 +373,8 @@ class OC_Mount_Config {
|
||||||
$isPersonal = false) {
|
$isPersonal = false) {
|
||||||
$backends = self::getBackends();
|
$backends = self::getBackends();
|
||||||
$mountPoint = OC\Files\Filesystem::normalizePath($mountPoint);
|
$mountPoint = OC\Files\Filesystem::normalizePath($mountPoint);
|
||||||
if ($mountPoint === '' || $mountPoint === '/' || $mountPoint == '/Shared') {
|
if ($mountPoint === '' || $mountPoint === '/') {
|
||||||
// can't mount at root or "Shared" folder
|
// can't mount at root folder
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,9 +128,6 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase {
|
||||||
$isPersonal = false;
|
$isPersonal = false;
|
||||||
$this->assertFalse(OC_Mount_Config::addMountPoint('', $storageClass, array(), $mountType, $applicable, $isPersonal));
|
$this->assertFalse(OC_Mount_Config::addMountPoint('', $storageClass, array(), $mountType, $applicable, $isPersonal));
|
||||||
$this->assertFalse(OC_Mount_Config::addMountPoint('/', $storageClass, array(), $mountType, $applicable, $isPersonal));
|
$this->assertFalse(OC_Mount_Config::addMountPoint('/', $storageClass, array(), $mountType, $applicable, $isPersonal));
|
||||||
$this->assertFalse(OC_Mount_Config::addMountPoint('Shared', $storageClass, array(), $mountType, $applicable, $isPersonal));
|
|
||||||
$this->assertFalse(OC_Mount_Config::addMountPoint('/Shared', $storageClass, array(), $mountType, $applicable, $isPersonal));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -488,7 +485,7 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase {
|
||||||
'root' => 'someroot'
|
'root' => 'someroot'
|
||||||
);
|
);
|
||||||
|
|
||||||
// add mount point as "test" user
|
// add mount point as "test" user
|
||||||
$this->assertTrue(
|
$this->assertTrue(
|
||||||
OC_Mount_Config::addMountPoint(
|
OC_Mount_Config::addMountPoint(
|
||||||
'/ext',
|
'/ext',
|
||||||
|
|
Loading…
Reference in New Issue