aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_cache.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-08-14 15:44:47 -0700
committerChris Lu <chris.lu@gmail.com>2021-08-14 15:44:47 -0700
commit889b143fa73b95f15548fd31e0543496afd91362 (patch)
tree0c8c0e809f9b63a9dffea7b496c57779ac6a8b61 /weed/shell/command_remote_cache.go
parentf365af81c23ea7fb7cbc204b9cc988f9fb549ebc (diff)
downloadseaweedfs-889b143fa73b95f15548fd31e0543496afd91362.tar.xz
seaweedfs-889b143fa73b95f15548fd31e0543496afd91362.zip
adjust modification detection logic
Diffstat (limited to 'weed/shell/command_remote_cache.go')
-rw-r--r--weed/shell/command_remote_cache.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/shell/command_remote_cache.go b/weed/shell/command_remote_cache.go
index c74166611..8980fc82e 100644
--- a/weed/shell/command_remote_cache.go
+++ b/weed/shell/command_remote_cache.go
@@ -118,7 +118,7 @@ func shouldCacheToLocal(entry *filer_pb.Entry) bool {
if entry.RemoteEntry == nil {
return false
}
- if entry.RemoteEntry.LocalMtime == 0 && entry.RemoteEntry.RemoteSize > 0 {
+ if entry.RemoteEntry.LocalMtime < entry.Attributes.Mtime && entry.RemoteEntry.RemoteSize > 0 {
return true
}
return false