mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
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
@ -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 New Issue
Block a user