diff options
| author | chrislu <chris.lu@gmail.com> | 2023-04-22 22:32:21 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-04-22 22:32:21 -0700 |
| commit | e1b92bc701454285af15c7fb57a1645ba277e3c4 (patch) | |
| tree | 09517d1318d59402f322aeccea32b4504ae41e10 | |
| parent | ff7b6d779e725e6b07b63d12d6c7cebec24fdd57 (diff) | |
| download | seaweedfs-e1b92bc701454285af15c7fb57a1645ba277e3c4.tar.xz seaweedfs-e1b92bc701454285af15c7fb57a1645ba277e3c4.zip | |
reset local file content if remote file is updated
fix https://github.com/seaweedfs/seaweedfs/issues/4289
| -rw-r--r-- | weed/shell/command_remote_mount.go | 3 |
1 files changed, 3 insertions, 0 deletions
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, |
