From 5494e76041cacc851a89ccdec1132b159e831b00 Mon Sep 17 00:00:00 2001 From: janeczku Date: Wed, 3 Jan 2018 01:15:41 +0100 Subject: [PATCH] =?UTF-8?q?Cosmetic:=20Fixed=20=E2=80=9E/var/log/boot:=20i?= =?UTF-8?q?s=20a=20directory=E2=80=9C=20error=20in=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: janeczku --- init/init.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init/init.go b/init/init.go index 8dce80c8..4ebb8b9f 100755 --- a/init/init.go +++ b/init/init.go @@ -362,9 +362,11 @@ func RunInit() error { bootLog := "/var/log/" if files, err := ioutil.ReadDir(bootLog); err == nil { for _, file := range files { - filePath := filepath.Join(bootLog, file.Name()) - filesToCopy = append(filesToCopy, filePath) - log.Debugf("Swizzle: Found %s to save", filePath) + if !file.IsDir() { + filePath := filepath.Join(bootLog, file.Name()) + filesToCopy = append(filesToCopy, filePath) + log.Debugf("Swizzle: Found %s to save", filePath) + } } } bootLog = "/var/log/boot/"