mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 09:09:24 +08:00
filer subscribe: handle rename subscription
This commit is contained in:
@@ -153,8 +153,15 @@ func (fs *FilerServer) eachEventNotificationFn(req *filer_pb.SubscribeMetadataRe
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(fullpath, req.PathPrefix) {
|
||||
if eventNotification.NewParentPath != "" {
|
||||
newFullPath := util.Join(eventNotification.NewParentPath, entryName)
|
||||
if !strings.HasPrefix(newFullPath, req.PathPrefix) {
|
||||
return nil
|
||||
}
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
message := &filer_pb.SubscribeMetadataResponse{
|
||||
Directory: dirPath,
|
||||
|
Reference in New Issue
Block a user