From e1b92bc701454285af15c7fb57a1645ba277e3c4 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 22 Apr 2023 22:32:21 -0700 Subject: [PATCH] reset local file content if remote file is updated fix https://github.com/seaweedfs/seaweedfs/issues/4289 --- weed/shell/command_remote_mount.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go index 00f783b49..9dffd10eb 100644 --- a/weed/shell/command_remote_mount.go +++ b/weed/shell/command_remote_mount.go @@ -182,6 +182,9 @@ func doSaveRemoteEntry(client filer_pb.SeaweedFilerClient, localDir string, exis existingEntry.RemoteEntry = remoteEntry existingEntry.Attributes.FileSize = uint64(remoteEntry.RemoteSize) existingEntry.Attributes.Mtime = remoteEntry.RemoteMtime + existingEntry.Attributes.Md5 = nil + existingEntry.Chunks = nil + existingEntry.Content = nil _, updateErr := client.UpdateEntry(context.Background(), &filer_pb.UpdateEntryRequest{ Directory: localDir, Entry: existingEntry,