aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cachestorefiles.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/cachestorefiles.h b/src/cachestorefiles.h
index 6b37d0a..0416f8b 100644
--- a/src/cachestorefiles.h
+++ b/src/cachestorefiles.h
@@ -68,12 +68,19 @@ namespace Bu
68 68
69 virtual obtype *load( const keytype &key ) 69 virtual obtype *load( const keytype &key )
70 { 70 {
71 Bu::MemBuf mb; 71 try
72 Bu::Formatter f( mb ); 72 {
73 f << sPrefix << "/" << key; 73 Bu::MemBuf mb;
74 Bu::File fIn( mb.getString(), Bu::File::Read ); 74 Bu::Formatter f( mb );
75 obtype *pOb = __cacheStoreFilesLoad<keytype, obtype>( fIn, key ); 75 f << sPrefix << "/" << key;
76 return pOb; 76 Bu::File fIn( mb.getString(), Bu::File::Read );
77 obtype *pOb = __cacheStoreFilesLoad<keytype, obtype>( fIn, key );
78 return pOb;
79 }
80 catch(...)
81 {
82 throw Bu::HashException("File-key not found.");
83 }
77 } 84 }
78 85
79 virtual void unload( obtype *pObj, const keytype &key ) 86 virtual void unload( obtype *pObj, const keytype &key )