1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-04 17:43:50 +00:00

Fixes after running errcheck

This commit is contained in:
Nick Craig-Wood
2014-07-25 18:19:49 +01:00
parent 125fc8f1f0
commit 17ffb0855f
6 changed files with 22 additions and 14 deletions

View File

@@ -217,12 +217,15 @@ func (f *FsLocal) readPrecision() (precision time.Duration) {
}
path := fd.Name()
// fmt.Println("Created temp file", path)
fd.Close()
err = fd.Close()
if err != nil {
return time.Second
}
// Delete it on return
defer func() {
// fmt.Println("Remove temp file")
os.Remove(path)
_ = os.Remove(path) // ignore error
}()
// Find the minimum duration we can detect