Fix genversion error in unclean build directories
authorDaniel Albers <daniel@lbers.com>
Thu, 4 Mar 2010 08:43:01 +0000 (09:43 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 4 Mar 2010 13:47:10 +0000 (14:47 +0100)
src/common/genversion.cpp

index 5b8c4a1..f0f746b 100644 (file)
@@ -125,6 +125,7 @@ int main(int argc, char **argv) {
   QByteArray oldContents = gen.readAll();
   if(oldContents != contents) { // only touch the file if something changed
     gen.seek(0);
   QByteArray oldContents = gen.readAll();
   if(oldContents != contents) { // only touch the file if something changed
     gen.seek(0);
+    gen.resize(0);
     gen.write(contents);
     gen.waitForBytesWritten(10000);
   }
     gen.write(contents);
     gen.waitForBytesWritten(10000);
   }