From 03ce26ec69af376139e8d471e9dd2d3e4f85bc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 31 Oct 2024 10:52:17 -0400 Subject: [PATCH] incusd/instance_logs: Update log file list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- cmd/incusd/instance_logs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/incusd/instance_logs.go b/cmd/incusd/instance_logs.go index 8ad7bc889d..224d0e13a9 100644 --- a/cmd/incusd/instance_logs.go +++ b/cmd/incusd/instance_logs.go @@ -6,6 +6,7 @@ import ( "net/url" "os" "path/filepath" + "slices" "strings" "github.com/gorilla/mux" @@ -668,8 +669,7 @@ func validLogFileName(fname string) bool { /* Let's just require that the paths be relative, so that we don't have * to deal with any escaping or whatever. */ - return fname == "lxc.log" || - fname == "qemu.log" || + return slices.Contains([]string{"lxc.log", "qemu.log", "qemu.early.log", "qemu.qmp.log"}, fname) || strings.HasPrefix(fname, "migration_") || strings.HasPrefix(fname, "snapshot_") }