From 743743d35e598de23ede74a4e173c35e607901e4 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Sat, 17 Dec 2016 02:26:01 -0800 Subject: debug --- cmd/ponzu/options.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go index e14c5b4..1076d93 100644 --- a/cmd/ponzu/options.go +++ b/cmd/ponzu/options.go @@ -168,14 +168,16 @@ func vendorCorePackages(path string) error { return nil } -func copyFile(info os.FileInfo, src string, dst string) error { - dstFile, err := os.Create(filepath.Join(dst, info.Name())) +func copyFile(src, dst string) error { + noRoot := strings.Split(src, string(filepath.Separator))[1:] + path := filepath.Join(noRoot...) + dstFile, err := os.Create(filepath.Join(dst, path)) defer dstFile.Close() if err != nil { return err } - srcFile, err := os.Open(filepath.Join(src, info.Name())) + srcFile, err := os.Open(src) defer srcFile.Close() if err != nil { return err @@ -221,7 +223,7 @@ func copyFilesWarnConflicts(srcDir, dstDir string, conflicts []string) error { } } - err = copyFile(info, srcDir, dstDir) + err = copyFile(path, dstDir) if err != nil { return err } -- cgit v1.2.3