Fixup Into<str> for Path

This commit is contained in:
Matthias Beyer 2015-12-27 17:38:56 +01:00
parent 71bf650653
commit 003efb6296

View file

@ -87,7 +87,12 @@ impl<'a> Into<&'a str> for Path<'a> {
let s = self.base.clone();
s.push(self.store.clone());
s.push(self.module.name());
s.push(self.id.into());
if self.id.is_some() {
let idstr : String = self.id.unwrap().into();
s.push(idstr);
} else {
s.push("*");
}
s.set_extension("imag");
s.to_str().unwrap_or("")
}