Navigation Menu

Skip to content

Commit

Permalink
After fetching, make sure dirty=false.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwen committed Jun 14, 2012
1 parent e4edd01 commit 4c8d71a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs.go
Expand Up @@ -336,12 +336,13 @@ func (n *fileNode) fetch() error {
dt := time.Now().Sub(start) dt := time.Now().Sub(start)
if err == nil { if err == nil {
n.backing = f.Name() n.backing = f.Name()
n.dirty = false
log.Printf("fetched %q, %d bytes in %d ms. %.1f MB/s", n.file.Name(), sz, 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())) dt.Nanoseconds()/1e6, 1e3*float64(sz)/float64(dt.Nanoseconds()))
} else { } else {
log.Printf("error fetching: %v", err) log.Printf("error fetching: %v", err)
} }

return err return err
} }


Expand Down

0 comments on commit 4c8d71a

Please sign in to comment.