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