mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
reset local file content if remote file is updated
fix https://github.com/seaweedfs/seaweedfs/issues/4289
This commit is contained in:
parent
ff7b6d779e
commit
e1b92bc701
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue