Skip to content

Commit

Permalink
Fixed bug which prevents cached FS files from being updated
Browse files Browse the repository at this point in the history
Bug was introduced in previous "Fixed recompressing of stale files"
commit.
  • Loading branch information
erikdubbelboer committed Jun 12, 2020
1 parent 2f28edb commit 380f00b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ func (h *fsHandler) openFSFile(filePath string, mustCompress bool) (*fsFile, err
// Only re-create the compressed file if there was more than a second between the mod times.
// On MacOS the gzip seems to truncate the nanoseconds in the mod time causing the original file
// to look newer than the gzipped file.
if fileInfo.ModTime().Sub(fileInfoOriginal.ModTime()) >= time.Second {
if fileInfoOriginal.ModTime().Sub(fileInfo.ModTime()) >= time.Second {
// The compressed file became stale. Re-create it.
f.Close()
os.Remove(filePath)
Expand Down

0 comments on commit 380f00b

Please sign in to comment.