diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-05-20 23:07:52 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-20 23:07:52 +0000 |
commit | 8b5f78d058407cb874cbd4a2d917757dc959a482 (patch) | |
tree | 3187a75630a73f1792d5488362a3b48c4efefba0 /src | |
parent | 96e6c35ec13aa4982a90d78a24617cf5110842da (diff) | |
download | libbu++-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.
Diffstat (limited to '')
-rw-r--r-- | src/cachestorefiles.h | 7 |
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 | } |