From ababa26c1748836f4b494b79d4c69cdc76f784b1 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 4 Jun 2003 20:36:38 +0000 Subject: [PATCH] Simplify. Clear Cache/Banners, too (doesn't exist just yet). --- stepmania/src/SongCacheIndex.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/stepmania/src/SongCacheIndex.cpp b/stepmania/src/SongCacheIndex.cpp index 61f954910c..876b893235 100644 --- a/stepmania/src/SongCacheIndex.cpp +++ b/stepmania/src/SongCacheIndex.cpp @@ -22,6 +22,22 @@ SongCacheIndex::~SongCacheIndex() } +static void EmptyDir( CString dir ) +{ + ASSERT(dir[dir.size()-1] == '/'); + + CStringArray asCacheFileNames; + GetDirListing( dir, asCacheFileNames ); + for( unsigned i=0; iTrace( "Cache format is out of date. Deleting all cache files." ); - CStringArray asCacheFileNames; - GetDirListing( "Cache/*", asCacheFileNames ); - for( unsigned i=0; i