mirror of
https://github.com/restic/restic.git
synced 2025-03-13 20:41:27 +00:00
Merge pull request #1613 from restic/strip-space-files-from
Strip spaces from items read via --files-from
This commit is contained in:
commit
2debb5c0e0
7
changelog/0.8.2/issue-1590
Normal file
7
changelog/0.8.2/issue-1590
Normal file
@ -0,0 +1,7 @@
|
||||
Bugfix: Strip spaces for lines read via --files-from
|
||||
|
||||
Leading and trailing spaces in lines read via `--files-from` are now stripped,
|
||||
so it behaves the same as with lines read via `--exclude-file`.
|
||||
|
||||
https://github.com/restic/restic/issues/1590
|
||||
https://github.com/restic/restic/pull/1613
|
@ -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…
x
Reference in New Issue
Block a user