diff --git a/fs.go b/fs.go index dd6234b..9db399d 100644 --- a/fs.go +++ b/fs.go @@ -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)