mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if mtimeMapping.Real == info.ModTime() {
|
if mtimeMapping.Real.Equal(info.ModTime()) {
|
||||||
info = mtimeFileInfo{
|
info = mtimeFileInfo{
|
||||||
FileInfo: info,
|
FileInfo: info,
|
||||||
mtime: mtimeMapping.Virtual,
|
mtime: mtimeMapping.Virtual,
|
||||||
@ -108,7 +108,7 @@ func (f *mtimeFS) Lstat(name string) (FileInfo, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if mtimeMapping.Real == info.ModTime() {
|
if mtimeMapping.Real.Equal(info.ModTime()) {
|
||||||
info = mtimeFileInfo{
|
info = mtimeFileInfo{
|
||||||
FileInfo: info,
|
FileInfo: info,
|
||||||
mtime: mtimeMapping.Virtual,
|
mtime: mtimeMapping.Virtual,
|
||||||
@ -215,7 +215,7 @@ func (f mtimeFile) Stat() (FileInfo, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if mtimeMapping.Real == info.ModTime() {
|
if mtimeMapping.Real.Equal(info.ModTime()) {
|
||||||
info = mtimeFileInfo{
|
info = mtimeFileInfo{
|
||||||
FileInfo: info,
|
FileInfo: info,
|
||||||
mtime: mtimeMapping.Virtual,
|
mtime: mtimeMapping.Virtual,
|
||||||
|
Loading…
Reference in New Issue
Block a user