diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2020-06-12 21:47:32 +0200 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2020-06-12 21:47:32 +0200 |
commit | 380f00bfdba28d882bc5a01967cc3db12dfad0c2 (patch) | |
tree | 9eb86cf4f181fe9e3cdd134d08bab27cf20b6f3a /fs.go | |
parent | Fixed recompressing of stale files (diff) | |
download | fasthttp-380f00bfdba28d882bc5a01967cc3db12dfad0c2.tar.gz fasthttp-380f00bfdba28d882bc5a01967cc3db12dfad0c2.tar.bz2 fasthttp-380f00bfdba28d882bc5a01967cc3db12dfad0c2.zip |
Fixed bug which prevents cached FS files from being updated
Bug was introduced in previous "Fixed recompressing of stale files"
commit.
Diffstat (limited to 'fs.go')
-rw-r--r-- | fs.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |