feat: store the mountpoint of storages in the mount options

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/47354/head
Robin Appelman 2024-08-20 13:31:35 +07:00 committed by backportbot[bot]
parent 1e93ebc9a6
commit e9fcf6bc9c
1 changed files with 3 additions and 2 deletions

@ -122,8 +122,9 @@ class SetupManager {
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
Filesystem::addStorageWrapper('mount_options', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
if ($mount->getOptions() && $storage->instanceOfStorage(Common::class)) {
$storage->setMountOptions($mount->getOptions());
if ($storage->instanceOfStorage(Common::class)) {
$options = array_merge($mount->getOptions(), ['mount_point' => $mountPoint]);
$storage->setMountOptions($options);
}
return $storage;
});