Add helper for building file prefix

This helper builds the file prefix for the files of a module.
This commit is contained in:
Matthias Beyer 2015-11-28 16:12:33 +01:00
parent 144398a2ad
commit f060c89751

View file

@ -235,7 +235,11 @@ impl StorageBackend {
debug!(" basepath: '{}'", self.basepath);
debug!(" storepath: '{}'", self.storepath);
debug!(" id : '{}'", id);
self.storepath.clone() + owner.name() + "-" + &id[..] + ".imag"
self.prefix_of_files_for_module(owner) + "-" + &id[..] + ".imag"
}
fn prefix_of_files_for_module(&self, m: &Module) -> String {
self.storepath.clone() + m.name()
}
}