From 723e9a6772982fa889d2514b5786fd6ec1915809 Mon Sep 17 00:00:00 2001 From: Mircea Roata Date: Thu, 15 Feb 2024 01:30:27 +0200 Subject: [PATCH] Allow invalid remote servers to be removed --- backend/ficsitcli/remote_servers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/ficsitcli/remote_servers.go b/backend/ficsitcli/remote_servers.go index 40978678..23a5afcc 100644 --- a/backend/ficsitcli/remote_servers.go +++ b/backend/ficsitcli/remote_servers.go @@ -51,7 +51,10 @@ func (f *ficsitCLI) RemoveRemoteServer(path string) error { if !ok { return fmt.Errorf("installation not found") } - if metadata.Info == nil || metadata.Info.Location != common.LocationTypeRemote { + if metadata.State == InstallStateLoading { + return fmt.Errorf("installation is still loading") + } + if metadata.Info != nil && metadata.Info.Location != common.LocationTypeRemote { return fmt.Errorf("installation is not remote") } err := f.ficsitCli.Installations.DeleteInstallation(path)