Skip to content

Commit

Permalink
Fixes #29 changetime of locals not changed after push
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Odeke committed Jan 5, 2015
1 parent 5635ebe commit a3f2ae2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions push.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func lonePush(g *Commands, parent, absPath, path string) (cl []*Change, err erro
func (g *Commands) remoteMod(change *Change) (err error) {
defer g.taskDone()
absPath := g.context.AbsPathOf(change.Path)
var updated, parent *File
var parent *File
if change.Dest != nil {
change.Src.Id = change.Dest.Id // TODO: bad hack
}
Expand All @@ -131,11 +131,8 @@ func (g *Commands) remoteMod(change *Change) (err error) {
return err
}
}
updated, err = g.rem.Upsert(parent.Id, change.Src, body)
if err != nil {
return
}
return os.Chtimes(absPath, updated.ModTime, updated.ModTime)
_, err = g.rem.Upsert(parent.Id, change.Src, body)
return err
}

func (g *Commands) remoteAdd(change *Change) (err error) {
Expand Down

0 comments on commit a3f2ae2

Please sign in to comment.