diff --git a/bin/core/imag-tag/src/main.rs b/bin/core/imag-tag/src/main.rs index f1dd010c..8a48f605 100644 --- a/bin/core/imag-tag/src/main.rs +++ b/bin/core/imag-tag/src/main.rs @@ -255,7 +255,7 @@ mod tests { } fn get_entry_tags<'a>(entry: &'a FileLockEntry<'a>) -> TomlQueryResult> { - entry.get_header().read(&"imag.tags".to_owned()) + entry.get_header().read(&"tag.values".to_owned()) } fn tags_toml_value<'a, I: IntoIterator>(tags: I) -> Value { diff --git a/lib/entry/libimagentrytag/src/tagable.rs b/lib/entry/libimagentrytag/src/tagable.rs index 65c3275d..7b0e8135 100644 --- a/lib/entry/libimagentrytag/src/tagable.rs +++ b/lib/entry/libimagentrytag/src/tagable.rs @@ -49,7 +49,7 @@ pub trait Tagable { impl Tagable for Value { fn get_tags(&self) -> Result> { - let tags = try!(self.read("imag.tags").chain_err(|| TagErrorKind::HeaderReadError)); + let tags = try!(self.read("tag.values").chain_err(|| TagErrorKind::HeaderReadError)); match tags { Some(&Value::Array(ref tags)) => { @@ -85,7 +85,8 @@ impl Tagable for Value { } let a = ts.iter().unique().map(|t| Value::String(t.clone())).collect(); - self.set("imag.tags", Value::Array(a)) + debug!("Setting tags = {:?}", a); + self.set("tags", Value::Array(a)) .map(|_| ()) .chain_err(|| TagErrorKind::HeaderWriteError) } @@ -119,7 +120,7 @@ impl Tagable for Value { } fn has_tag(&self, t: TagSlice) -> Result { - let tags = try!(self.read("imag.tags").chain_err(|| TagErrorKind::HeaderReadError)); + let tags = try!(self.read("tag.values").chain_err(|| TagErrorKind::HeaderReadError)); if !tags.iter().all(|t| is_match!(*t, &Value::String(_))) { return Err(TagErrorKind::TagTypeError.into());