mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 09:18:28 +00:00
fix(notify): Fix XML Filter parsing and add comprehensive tests (#2191)
This commit is contained in:
@@ -111,15 +111,11 @@ pub mod notifier_global {
|
||||
suffix: &str,
|
||||
target_ids: &[TargetID],
|
||||
) -> Result<(), NotificationError> {
|
||||
// Construct pattern, simple splicing of prefixes and suffixes
|
||||
let mut pattern = String::new();
|
||||
if !prefix.is_empty() {
|
||||
pattern.push_str(prefix);
|
||||
}
|
||||
pattern.push('*');
|
||||
if !suffix.is_empty() {
|
||||
pattern.push_str(suffix);
|
||||
}
|
||||
// Construct pattern using proper pattern function
|
||||
let pattern = crate::rules::pattern::new_pattern(
|
||||
if prefix.is_empty() { None } else { Some(prefix) },
|
||||
if suffix.is_empty() { None } else { Some(suffix) },
|
||||
);
|
||||
|
||||
// Create BucketNotificationConfig
|
||||
let mut bucket_config = BucketNotificationConfig::new(region);
|
||||
|
||||
Reference in New Issue
Block a user