forked from TrueCloudLab/restic
pipe: join replaced paths with original path
When saving `/`, it was replaced with the contents, but without the proper path. So `/` was replaced by [`boot`, `bin`, `home`, ...], but without prefixing the entry name with the proper path.
This commit is contained in:
parent
6a5b022939
commit
9048eb676b
1 changed files with 10 additions and 1 deletions
11
pipe/pipe.go
11
pipe/pipe.go
|
@ -174,7 +174,16 @@ func cleanupPath(path string) ([]string, error) {
|
|||
return []string{path}, nil
|
||||
}
|
||||
|
||||
return readDirNames(path)
|
||||
paths, err := readDirNames(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for i, p := range paths {
|
||||
paths[i] = filepath.Join(path, p)
|
||||
}
|
||||
|
||||
return paths, nil
|
||||
}
|
||||
|
||||
// Walk sends a Job for each file and directory it finds below the paths. When
|
||||
|
|
Loading…
Reference in a new issue