aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_remote_sync_dir.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-10 14:18:28 -0700
committerchrislu <chris.lu@gmail.com>2022-09-10 14:18:28 -0700
commit2c6b68b40effc0ed96439a5ba09242e463c303f3 (patch)
tree3d6a48c795189ff271c8734273855be2ad75c548 /weed/command/filer_remote_sync_dir.go
parentb64674018a618ea6a46137fd50fd687e8f72957f (diff)
downloadseaweedfs-2c6b68b40effc0ed96439a5ba09242e463c303f3.tar.xz
seaweedfs-2c6b68b40effc0ed96439a5ba09242e463c303f3.zip
simplify a bit
Diffstat (limited to 'weed/command/filer_remote_sync_dir.go')
-rw-r--r--weed/command/filer_remote_sync_dir.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/weed/command/filer_remote_sync_dir.go b/weed/command/filer_remote_sync_dir.go
index 288b89a5a..a36145fca 100644
--- a/weed/command/filer_remote_sync_dir.go
+++ b/weed/command/filer_remote_sync_dir.go
@@ -37,11 +37,10 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
var lastLogTsNs = time.Now().UnixNano()
processEventFnWithOffset := pb.AddOffsetFunc(func(resp *filer_pb.SubscribeMetadataResponse) error {
- storageClass := *option.storageClass
- if storageClass == "" {
+ if *option.storageClass == "" {
delete(resp.EventNotification.NewEntry.Extended, s3_constants.AmzStorageClass)
- } else if storageClass != "None" {
- resp.EventNotification.NewEntry.Extended[s3_constants.AmzStorageClass] = []byte(storageClass)
+ } else {
+ resp.EventNotification.NewEntry.Extended[s3_constants.AmzStorageClass] = []byte(*option.storageClass)
}
processor.AddSyncJob(resp)
return nil