mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 10:37:24 +08:00
file path supports windows, avoiding back slashes
fix https://github.com/chrislusf/seaweedfs/issues/868
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user