From f25e3683a1520e0c597f608dc53e17b406536a69 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 3 Dec 2015 17:33:48 +0100 Subject: [PATCH] Add hash type to filepath --- src/storage/backend.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/storage/backend.rs b/src/storage/backend.rs index 4d59c539..40ace0f0 100644 --- a/src/storage/backend.rs +++ b/src/storage/backend.rs @@ -224,12 +224,20 @@ impl StorageBackend { } fn build_filepath_with_id(&self, owner: &Module, id: FileID) -> String { + let idstr : String = id.clone().into(); + let idtype : FileIDType = id.into(); + let typestr : String = idtype.into(); + debug!("Building filepath with id"); debug!(" basepath: '{}'", self.basepath); debug!(" storepath: '{}'", self.storepath); - debug!(" id : '{}'", id); - let idstr : String = id.into(); - self.prefix_of_files_for_module(owner) + "-" + &idstr[..] + ".imag" + debug!(" id: '{}'", idstr); + debug!(" type: '{}'", typestr); + + self.prefix_of_files_for_module(owner) + + "-" + &typestr[..] + + "-" + &idstr[..] + + ".imag" } fn prefix_of_files_for_module(&self, m: &Module) -> String {