From 31ff506309ce8063a6eef4e03b287cd33f707098 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 27 Feb 2017 19:42:00 +0100 Subject: [PATCH] Ignore empty lines in --files-from Closes #822 --- src/cmds/restic/cmd_backup.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmds/restic/cmd_backup.go b/src/cmds/restic/cmd_backup.go index dca861298..3d2514ed3 100644 --- a/src/cmds/restic/cmd_backup.go +++ b/src/cmds/restic/cmd_backup.go @@ -304,7 +304,11 @@ func readLinesFromFile(filename string) ([]string, error) { scanner := bufio.NewScanner(r) for scanner.Scan() { - lines = append(lines, scanner.Text()) + line := scanner.Text() + if line == "" { + continue + } + lines = append(lines, line) } if err := scanner.Err(); err != nil {