Ensure that the default mountpoint is created when cloning a station (#4310)

This commit is contained in:
Vaalyn 2021-06-19 20:43:19 +02:00 committed by GitHub
parent d812ca3c74
commit d5406b5546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -169,6 +169,12 @@ class StationCloneForm extends StationForm
if (in_array(self::CLONE_MOUNTS, $toClone, true)) {
$record = $this->reloadableEm->refetch($record);
$this->cloneCollection($record->getMounts(), $newStation, $copier);
} else {
$newStation = $this->reloadableEm->refetch($newStation);
// Create default mountpoints if station supports them.
$frontendAdapter = $this->adapters->getFrontendAdapter($newStation);
$this->stationRepo->resetMounts($newStation, $frontendAdapter);
}
if (in_array(self::CLONE_REMOTES, $toClone, true)) {