filelist: trim whitespace from lines read from files (MR 55)

Fixes issues with leading/trailing whitespaces really messing with mkinitfs
This commit is contained in:
Clayton Craft
2024-07-11 11:33:57 -07:00
parent 1fed057a82
commit cd97df108a
4 changed files with 7 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ func (h *HookDirs) List() (*filelist.FileList, error) {
s := bufio.NewScanner(f)
for s.Scan() {
dir := s.Text()
dir := strings.TrimSpace(s.Text())
if len(dir) == 0 || strings.HasPrefix(dir, "#") {
continue
}