From 71d11fd915b77a4598088a336c78c176734e2d2b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 1 Nov 2003 22:09:56 +0000 Subject: [PATCH] Fix obscure editor save bugs: clear cache after writing. --- stepmania/src/NotesWriterDWI.cpp | 3 +++ stepmania/src/NotesWriterSM.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/stepmania/src/NotesWriterDWI.cpp b/stepmania/src/NotesWriterDWI.cpp index 8ee461c0f6..11615b528d 100644 --- a/stepmania/src/NotesWriterDWI.cpp +++ b/stepmania/src/NotesWriterDWI.cpp @@ -296,6 +296,9 @@ void NotesWriterDWI::WriteDWINotesField( FILE* fp, const Steps &out, int start ) bool NotesWriterDWI::WriteDWINotesTag( FILE* fp, const Steps &out ) { + /* Flush dir cache when writing steps, so the old size isn't cached. */ + FlushDirCache(); + LOG->Trace( "Steps::WriteDWINotesTag" ); switch( out.m_StepsType ) diff --git a/stepmania/src/NotesWriterSM.cpp b/stepmania/src/NotesWriterSM.cpp index ca1f36ed05..bf73c033e2 100644 --- a/stepmania/src/NotesWriterSM.cpp +++ b/stepmania/src/NotesWriterSM.cpp @@ -114,6 +114,9 @@ void NotesWriterSM::WriteSMNotesTag( const Steps &in, FILE* fp ) bool NotesWriterSM::Write(CString sPath, const Song &out, bool bSavingCache) { + /* Flush dir cache when writing steps, so the old size isn't cached. */ + FlushDirCache(); + unsigned i; FILE* fp = fopen( sPath, "w" );