Skip to content

Commit

Permalink
Merge pull request #41 from maxmind/greg/ignore-sync-errors
Browse files Browse the repository at this point in the history
Ignore Sync() errors
  • Loading branch information
horgh authored Sep 11, 2019
2 parents fa03a15 + 5d857cd commit 98bbeb0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/geoipupdate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"net/url"
"os"
"path/filepath"
"runtime"
"strings"
"time"

Expand Down Expand Up @@ -423,11 +422,9 @@ func writeAndCheck(
}
}()

if runtime.GOOS != "windows" {
if err := dh.Sync(); err != nil {
return errors.Wrap(err, "error syncing database directory")
}
}
// We ignore Sync errors as they primarily happen on file systems that do
// not support sync.
_ = dh.Sync()

if verbose {
log.Printf("Updated %s", target)
Expand Down

0 comments on commit 98bbeb0

Please sign in to comment.