Skip to content

Commit

Permalink
Replace 9p mount calls to syscall.Rename with os.Rename, which is cap…
Browse files Browse the repository at this point in the history
…able of renaming on top of existing files.
  • Loading branch information
frickenate authored and dlorenc committed Aug 6, 2018
1 parent 477ece9 commit d203cf4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion third_party/go9p/ufs_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func (u *Ufs) Wstat(req *SrvReq) {
destpath = path.Join(fiddir, dir.Name)
fmt.Printf("rel results in %s\n", destpath)
}
err := syscall.Rename(fid.path, destpath)
err := os.Rename(fid.path, destpath)
fmt.Printf("rename %s to %s gets %v\n", fid.path, destpath, err)
if err != nil {
req.RespondError(toError(err))
Expand Down
2 changes: 1 addition & 1 deletion third_party/go9p/ufs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (u *Ufs) Wstat(req *SrvReq) {
destpath = path.Join(fiddir, dir.Name)
fmt.Printf("rel results in %s\n", destpath)
}
err := syscall.Rename(fid.path, destpath)
err := os.Rename(fid.path, destpath)
fmt.Printf("rename %s to %s gets %v\n", fid.path, destpath, err)
if err != nil {
req.RespondError(toError(err))
Expand Down
2 changes: 1 addition & 1 deletion third_party/go9p/ufs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (u *Ufs) Wstat(req *SrvReq) {
destpath = path.Join(fiddir, dir.Name)
fmt.Printf("rel results in %s\n", destpath)
}
err := syscall.Rename(fid.path, destpath)
err := os.Rename(fid.path, destpath)
fmt.Printf("rename %s to %s gets %v\n", fid.path, destpath, err)
if err != nil {
req.RespondError(toError(err))
Expand Down

0 comments on commit d203cf4

Please sign in to comment.