From 00bb8c39b97638c872ebccc6aee7f3c5fb57d7d6 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 27 Jan 2009 16:54:55 +0000 Subject: Corrected the Bu::File::canRead() and Bu::File::canWrite() functions, they work now. It helps to read the system docs. Anyway, nids is all fixed up, it seems to work great now, and I guess I got all the corner cases we'll hit for a while, fishtrax really did a number on them :) I also cleaned up all the debugging output, now you can see your program run instead of libbu++ internals. There could still be a good amount of improvement made in nids, it really shouldn't re-write whole blocks every time you write to a stream, but that will be an easy change down the line that won't effect any of the existing code. --- src/cachestorenids.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/cachestorenids.h') diff --git a/src/cachestorenids.h b/src/cachestorenids.h index bd0fcc7..9288008 100644 --- a/src/cachestorenids.h +++ b/src/cachestorenids.h @@ -48,12 +48,6 @@ namespace Bu NidsStream ns = nStore.openStream( 0 ); Bu::Archive ar( ns, Bu::Archive::save ); ar << hId; - - Bu::FString sName; - sName.format("hash-%d.%02d", time( NULL ), iCnt++ ); - Bu::File sTmp( sName, Bu::File::Write|Bu::File::Create ); - Bu::Archive artmp( sTmp, Bu::Archive::save ); - artmp << hId; } virtual obtype *load( const keytype &key ) @@ -80,7 +74,6 @@ namespace Bu keytype key = __cacheGetKey( pSrc ); int iStream = nStore.createStream(); hId.insert( key, iStream ); - printf("Creating stream: %d\n", iStream ); NidsStream ns = nStore.openStream( iStream ); Bu::Archive ar( ns, Bu::Archive::save ); obtype *pOb = new obtype(); -- cgit v1.2.3