mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 15:23:17 -04:00
feat: store the mountpoint of storages in the mount options
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
3edc0f58c1
commit
52da5f715f
1 changed files with 3 additions and 2 deletions
|
|
@ -120,8 +120,9 @@ class SetupManager {
|
||||||
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
|
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
|
||||||
|
|
||||||
Filesystem::addStorageWrapper('mount_options', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
|
Filesystem::addStorageWrapper('mount_options', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
|
||||||
if ($mount->getOptions() && $storage->instanceOfStorage(Common::class)) {
|
if ($storage->instanceOfStorage(Common::class)) {
|
||||||
$storage->setMountOptions($mount->getOptions());
|
$options = array_merge($mount->getOptions(), ['mount_point' => $mountPoint]);
|
||||||
|
$storage->setMountOptions($options);
|
||||||
}
|
}
|
||||||
return $storage;
|
return $storage;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue