aboutsummaryrefslogtreecommitdiff
path: root/weed/replication/replicator.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-03-04 13:00:08 -0800
committerChris Lu <chris.lu@gmail.com>2019-03-04 13:00:08 -0800
commitd312c55bbed8ef69dc11bf024024c7b50f56f5b2 (patch)
tree54a351f73338c4f9ad1b03579ea9c4506e276bbd /weed/replication/replicator.go
parentf9dcf56465837b210e0b60a6b3a3c929c66c1f6b (diff)
downloadseaweedfs-d312c55bbed8ef69dc11bf024024c7b50f56f5b2.tar.xz
seaweedfs-d312c55bbed8ef69dc11bf024024c7b50f56f5b2.zip
file path supports windows, avoiding back slashes
fix https://github.com/chrislusf/seaweedfs/issues/868
Diffstat (limited to 'weed/replication/replicator.go')
-rw-r--r--weed/replication/replicator.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go
index ac8235fd5..48a81a093 100644
--- a/weed/replication/replicator.go
+++ b/weed/replication/replicator.go
@@ -34,7 +34,7 @@ func (r *Replicator) Replicate(key string, message *filer_pb.EventNotification)
glog.V(4).Infof("skipping %v outside of %v", key, r.source.Dir)
return nil
}
- newKey := filepath.Join(r.sink.GetSinkToDirectory(), key[len(r.source.Dir):])
+ newKey := filepath.ToSlash(filepath.Join(r.sink.GetSinkToDirectory(), key[len(r.source.Dir):]))
glog.V(3).Infof("replicate %s => %s", key, newKey)
key = newKey
if message.OldEntry != nil && message.NewEntry == nil {