Permalink
Browse files

After fetching, make sure dirty=false.

  • Loading branch information...
hanwen committed Jun 14, 2012
1 parent e4edd01 commit 4c8d71a2e1f5fc94e6ffdf080a13443e40f164ae
Showing with 2 additions and 1 deletion.
  1. +2 −1 fs.go
View
3 fs.go
@@ -336,12 +336,13 @@ func (n *fileNode) fetch() error {
dt := time.Now().Sub(start)
if err == nil {
n.backing = f.Name()
+ n.dirty = false
log.Printf("fetched %q, %d bytes in %d ms. %.1f MB/s", n.file.Name(), sz,
dt.Nanoseconds()/1e6, 1e3*float64(sz)/float64(dt.Nanoseconds()))
} else {
log.Printf("error fetching: %v", err)
}
-
+
return err
}

0 comments on commit 4c8d71a

Please sign in to comment.