diff --git a/app/Models/LocalFileVolume.php b/app/Models/LocalFileVolume.php
index 62ee4c45c..0b9491da6 100644
--- a/app/Models/LocalFileVolume.php
+++ b/app/Models/LocalFileVolume.php
@@ -79,8 +79,12 @@ public function saveStorageOnServer()
$isFile = instant_remote_process(["test -f $path && echo OK || echo NOK"], $server);
$isDir = instant_remote_process(["test -d $path && echo OK || echo NOK"], $server);
if ($isFile == 'OK' && $fileVolume->is_directory) {
+ $fileVolume->is_directory = false;
+ $fileVolume->save();
throw new \Exception('The following file is a file on the server, but you are trying to mark it as a directory. Please delete the file on the server or mark it as directory.');
} elseif ($isDir == 'OK' && ! $fileVolume->is_directory) {
+ $fileVolume->is_directory = true;
+ $fileVolume->save();
throw new \Exception('The following file is a directory on the server, but you are trying to mark it as a file.
Please delete the directory on the server or mark it as directory.');
}
if (! $fileVolume->is_directory && $isDir == 'NOK') {
diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php
index ee627c56b..d65c20f88 100644
--- a/resources/views/livewire/project/service/configuration.blade.php
+++ b/resources/views/livewire/project/service/configuration.blade.php
@@ -175,15 +175,15 @@ class="w-4 h-4 dark:text-warning text-coollabs"