aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_remote_sync_dir.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command/filer_remote_sync_dir.go')
-rw-r--r--weed/command/filer_remote_sync_dir.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/command/filer_remote_sync_dir.go b/weed/command/filer_remote_sync_dir.go
index 42dc9ff28..186523e45 100644
--- a/weed/command/filer_remote_sync_dir.go
+++ b/weed/command/filer_remote_sync_dir.go
@@ -64,12 +64,17 @@ func followUpdatesAndUploadToRemote(option *RemoteSyncOptions, filerSource *sour
option.clientEpoch++
+ prefix := mountedDir
+ if !strings.HasSuffix(prefix, "/") {
+ prefix = prefix + "/"
+ }
+
metadataFollowOption := &pb.MetadataFollowOption{
ClientName: "filer.remote.sync",
ClientId: option.clientId,
ClientEpoch: option.clientEpoch,
SelfSignature: 0,
- PathPrefix: mountedDir,
+ PathPrefix: prefix,
AdditionalPathPrefixes: []string{filer.DirectoryEtcRemote},
DirectoriesToWatch: nil,
StartTsNs: lastOffsetTs.UnixNano(),