mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
lib/fs: Better equality comparison in mtimefs
This commit is contained in:
parent
2ae15aa454
commit
4cba99fcd4
@ -88,7 +88,7 @@ func (f *mtimeFS) Stat(name string) (FileInfo, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if mtimeMapping.Real == info.ModTime() {
|
||||
if mtimeMapping.Real.Equal(info.ModTime()) {
|
||||
info = mtimeFileInfo{
|
||||
FileInfo: info,
|
||||
mtime: mtimeMapping.Virtual,
|
||||
@ -108,7 +108,7 @@ func (f *mtimeFS) Lstat(name string) (FileInfo, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if mtimeMapping.Real == info.ModTime() {
|
||||
if mtimeMapping.Real.Equal(info.ModTime()) {
|
||||
info = mtimeFileInfo{
|
||||
FileInfo: info,
|
||||
mtime: mtimeMapping.Virtual,
|
||||
@ -215,7 +215,7 @@ func (f mtimeFile) Stat() (FileInfo, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if mtimeMapping.Real == info.ModTime() {
|
||||
if mtimeMapping.Real.Equal(info.ModTime()) {
|
||||
info = mtimeFileInfo{
|
||||
FileInfo: info,
|
||||
mtime: mtimeMapping.Virtual,
|
||||
|
Loading…
Reference in New Issue
Block a user