From 8133a8b770e1d891153981bbe5c02465723d4b7e Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 5 Aug 2024 18:38:13 +0200 Subject: [PATCH] fix: dir mounts should have proper dirs --- app/Livewire/Project/Shared/Storages/Add.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/Shared/Storages/Add.php b/app/Livewire/Project/Shared/Storages/Add.php index d22f3b05f..c576e2eb9 100644 --- a/app/Livewire/Project/Shared/Storages/Add.php +++ b/app/Livewire/Project/Shared/Storages/Add.php @@ -54,7 +54,11 @@ class Add extends Component public function mount() { - $this->file_storage_directory_source = application_configuration_dir()."/{$this->resource->uuid}"; + if (str($this->resource->getMorphClass())->contains('Standalone')) { + $this->file_storage_directory_source = database_configuration_dir()."/{$this->resource->uuid}"; + } else { + $this->file_storage_directory_source = application_configuration_dir()."/{$this->resource->uuid}"; + } $this->uuid = $this->resource->uuid; $this->parameters = get_route_parameters(); if (data_get($this->parameters, 'application_uuid')) {