forked from TrueCloudLab/restic
Strip spaces from items read via --files-from
In #1590, it was mentioned that while lines read from exclude files via `--exclude-file` have leading and trailing spaces stripped, this is not the case for lines read via `--files-from`. This commit fixes that, spaces are always stripped.
This commit is contained in:
parent
7f0d964a05
commit
c5575c7ed9
1 changed files with 1 additions and 1 deletions
|
@ -304,7 +304,7 @@ func readLinesFromFile(filename string) ([]string, error) {
|
|||
|
||||
scanner := bufio.NewScanner(r)
|
||||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
line := strings.TrimSpace(scanner.Text())
|
||||
// ignore empty lines
|
||||
if line == "" {
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue