From 9048eb676b55e0a6227eed597b54e37e1f659a82 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 7 Feb 2016 22:18:37 +0100 Subject: [PATCH] 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. --- pipe/pipe.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pipe/pipe.go b/pipe/pipe.go index 6aa4f3588..aeabcf8f4 100644 --- a/pipe/pipe.go +++ b/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