filelist/osksdl: fix crash when osk-sdl isn't found

Should have returned an empty FileList in this case
This commit is contained in:
Clayton Craft
2023-02-18 12:49:22 -08:00
parent 07c8c711c7
commit 25c3c03e24

View File

@@ -27,12 +27,12 @@ func New(mesaDriverName string) *OskSdl {
// Get a list of files and their dependencies related to supporting rootfs full // Get a list of files and their dependencies related to supporting rootfs full
// disk (d)encryption // disk (d)encryption
func (s *OskSdl) List() (*filelist.FileList, error) { func (s *OskSdl) List() (*filelist.FileList, error) {
if !misc.Exists("/usr/bin/osk-sdl") {
return nil, nil
}
log.Println("- Including osk-sdl support")
files := filelist.NewFileList() files := filelist.NewFileList()
if !misc.Exists("/usr/bin/osk-sdl") {
return files, nil
}
log.Println("- Including osk-sdl support")
confFiles := []string{ confFiles := []string{
"/etc/osk.conf", "/etc/osk.conf",