forked from TrueCloudLab/restic
Merge pull request #829 from restic/fix-822
Ignore empty lines in --files-from
This commit is contained in:
commit
4f5e9e939b
1 changed files with 5 additions and 1 deletions
|
@ -304,7 +304,11 @@ func readLinesFromFile(filename string) ([]string, error) {
|
||||||
|
|
||||||
scanner := bufio.NewScanner(r)
|
scanner := bufio.NewScanner(r)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
lines = append(lines, scanner.Text())
|
line := scanner.Text()
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
lines = append(lines, line)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := scanner.Err(); err != nil {
|
if err := scanner.Err(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue