2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 21:05:10 +00:00

Ignore empty lines in --files-from

Closes #822
This commit is contained in:
Alexander Neumann 2017-02-27 19:42:00 +01:00
parent 4a51ddf741
commit 31ff506309

View File

@ -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 {