aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vcs
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-12-17 16:56:39 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-12-17 19:09:10 +0100
commita9cc88c19f0c8907d7696b47a2b3b251a2ca06df (patch)
treeadedad6e0ff2a340c5b39bef617407f809a7e69e /pkg/vcs
parentb38da77e00c6c2fb3424224657e9f665e519ea2d (diff)
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.
Diffstat (limited to 'pkg/vcs')
-rw-r--r--pkg/vcs/fuchsia.go2
1 files changed, 1 insertions, 1 deletions
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) {