From a9cc88c19f0c8907d7696b47a2b3b251a2ca06df Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 17 Dec 2018 16:56:39 +0100 Subject: pkg/osutil: provide better Rename os.Rename fails for cross-device renaming (e.g. to/from tmpfs). This is quite unpleasant. Provide own version that falls back to copying. --- pkg/vcs/fuchsia.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/vcs') diff --git a/pkg/vcs/fuchsia.go b/pkg/vcs/fuchsia.go index 354be6c8d..f9a027f67 100644 --- a/pkg/vcs/fuchsia.go +++ b/pkg/vcs/fuchsia.go @@ -56,7 +56,7 @@ func (ctx *fuchsia) initRepo() error { if _, err := runSandboxed(tmpDir, "bash", "-c", cmd); err != nil { return err } - return os.Rename(filepath.Join(tmpDir, "fuchsia"), ctx.dir) + return osutil.Rename(filepath.Join(tmpDir, "fuchsia"), ctx.dir) } func (ctx *fuchsia) CheckoutBranch(repo, branch string) (*Commit, error) { -- cgit mrf-deployment