Skip to content

Commit

Permalink
incusd/instance_logs: Update log file list
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Oct 31, 2024
1 parent fb5b774 commit 03ce26e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/incusd/instance_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/url"
"os"
"path/filepath"
"slices"
"strings"

"github.com/gorilla/mux"
Expand Down Expand Up @@ -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_")
}
Expand Down

0 comments on commit 03ce26e

Please sign in to comment.