From 8b5f78d058407cb874cbd4a2d917757dc959a482 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 20 May 2010 23:07:52 +0000 Subject: Fixed a minor bug when a key resolved to an empty string. --- src/cachestorefiles.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { Bu::MemBuf mb; Bu::Formatter f( mb ); - f << sPrefix << "/" << key; + f << sPrefix << "/"; + Bu::FString sBase = mb.getString(); + f << key; + + if( sBase == mb.getString() ) + return false; return access( mb.getString().getStr(), F_OK ) == 0; } -- cgit v1.2.3