From f060c89751cf1edd811e494832cc6e040d3a724d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 28 Nov 2015 16:12:33 +0100 Subject: [PATCH] Add helper for building file prefix This helper builds the file prefix for the files of a module. --- src/storage/backend.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storage/backend.rs b/src/storage/backend.rs index 15035bfb..5bc27103 100644 --- a/src/storage/backend.rs +++ b/src/storage/backend.rs @@ -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() } }