filelist/osksdl: fix crash when osk-sdl isn't found
Should have returned an empty FileList in this case
This commit is contained in:
@@ -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",
|
||||||
|
Reference in New Issue
Block a user