Browse Source
Return ETag from remote when file doesn't exist on Filer (#4025)
pull/4028/head
aronneagu
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
weed/filer/filechunks.go
|
@ -42,6 +42,9 @@ func ETag(entry *filer_pb.Entry) (etag string) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func ETagEntry(entry *Entry) (etag string) { |
|
|
func ETagEntry(entry *Entry) (etag string) { |
|
|
|
|
|
if entry.IsInRemoteOnly() { |
|
|
|
|
|
return entry.Remote.RemoteETag |
|
|
|
|
|
} |
|
|
if entry.Attr.Md5 == nil { |
|
|
if entry.Attr.Md5 == nil { |
|
|
return ETagChunks(entry.GetChunks()) |
|
|
return ETagChunks(entry.GetChunks()) |
|
|
} |
|
|
} |
|
|