aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-20 23:07:52 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-20 23:07:52 +0000
commit8b5f78d058407cb874cbd4a2d917757dc959a482 (patch)
tree3187a75630a73f1792d5488362a3b48c4efefba0
parent96e6c35ec13aa4982a90d78a24617cf5110842da (diff)
downloadlibbu++-8b5f78d058407cb874cbd4a2d917757dc959a482.tar.gz
libbu++-8b5f78d058407cb874cbd4a2d917757dc959a482.tar.bz2
libbu++-8b5f78d058407cb874cbd4a2d917757dc959a482.tar.xz
libbu++-8b5f78d058407cb874cbd4a2d917757dc959a482.zip
Fixed a minor bug when a key resolved to an empty string.
-rw-r--r--src/cachestorefiles.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cachestorefiles.h b/src/cachestorefiles.h
index 6a80765..1906b13 100644
--- a/src/cachestorefiles.h
+++ b/src/cachestorefiles.h
@@ -137,7 +137,12 @@ namespace Bu
137 { 137 {
138 Bu::MemBuf mb; 138 Bu::MemBuf mb;
139 Bu::Formatter f( mb ); 139 Bu::Formatter f( mb );
140 f << sPrefix << "/" << key; 140 f << sPrefix << "/";
141 Bu::FString sBase = mb.getString();
142 f << key;
143
144 if( sBase == mb.getString() )
145 return false;
141 146
142 return access( mb.getString().getStr(), F_OK ) == 0; 147 return access( mb.getString().getStr(), F_OK ) == 0;
143 } 148 }