mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Remove invalid mounts from the active fs
This commit is contained in:
parent
0008db9995
commit
edb67f9f4d
2 changed files with 5 additions and 0 deletions
1
apps/files_sharing/lib/external/storage.php
vendored
1
apps/files_sharing/lib/external/storage.php
vendored
|
|
@ -142,6 +142,7 @@ class Storage extends DAV implements ISharedStorage {
|
|||
// since this is permanent (re-sharing the file will create a new token)
|
||||
// we remove the invalid storage
|
||||
$this->manager->removeShare($this->mountPoint);
|
||||
$this->manager->getMountManager()->removeMount($this->mountPoint);
|
||||
throw new StorageInvalidException();
|
||||
} else {
|
||||
// ownCloud instance is gone, likely to be a temporary server configuration error
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@ class Manager {
|
|||
* @param string $mountPoint
|
||||
*/
|
||||
public function removeMount($mountPoint) {
|
||||
$mountPoint = Filesystem::normalizePath($mountPoint);
|
||||
if (strlen($mountPoint) > 1) {
|
||||
$mountPoint .= '/';
|
||||
}
|
||||
unset($this->mounts[$mountPoint]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue