diff --git a/rslib/src/storage/tag/mod.rs b/rslib/src/storage/tag/mod.rs index 6cd44e193..e0f1b0bd4 100644 --- a/rslib/src/storage/tag/mod.rs +++ b/rslib/src/storage/tag/mod.rs @@ -68,7 +68,7 @@ impl SqliteStorage { pub(crate) fn clear_tag(&self, tag: &str) -> Result<()> { self.db .prepare_cached("delete from tags where tag regexp ?")? - .execute(&[format!("^{}($|::)", regex::escape(tag))])?; + .execute(&[format!("(?i)^{}($|::)", regex::escape(tag))])?; Ok(()) } diff --git a/rslib/src/tags.rs b/rslib/src/tags.rs index 876b96f8e..0e70d77bb 100644 --- a/rslib/src/tags.rs +++ b/rslib/src/tags.rs @@ -435,7 +435,7 @@ mod test { // tag children are also cleared when clearing their parent col.storage.clear_tags()?; - for name in vec!["a", "a::b", "a::b::c"] { + for name in vec!["a", "a::b", "A::b::c"] { col.register_tag(Tag::new(name.to_string(), Usn(0)))?; } col.storage.clear_tag("a")?;