diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-25 17:44:50 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-25 17:44:50 +0000 |
commit | 03d8d70b5dffb2ad24a2abd7cb85e958e9d18215 (patch) | |
tree | 8aeec425a21e14b6fe33288a1ff0474dab1d8888 | |
parent | 077e58415a7f6f2c55865be2c2fc35892450dd38 (diff) | |
download | mana-03d8d70b5dffb2ad24a2abd7cb85e958e9d18215.tar.gz mana-03d8d70b5dffb2ad24a2abd7cb85e958e9d18215.tar.bz2 mana-03d8d70b5dffb2ad24a2abd7cb85e958e9d18215.tar.xz mana-03d8d70b5dffb2ad24a2abd7cb85e958e9d18215.zip |
Fixed updating on Windows (rename was failing when target file existed).
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 5 | ||||
-rwxr-xr-x | configure.ac | 2 | ||||
-rw-r--r-- | src/gui/updatewindow.cpp | 11 |
4 files changed, 16 insertions, 6 deletions
@@ -1,3 +1,7 @@ +2006-07-25 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/gui/updatewindow.cpp: Fixed updating on Windows. + 2006-07-24 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/main.cpp: Fixed the loading of updates and made skipping the @@ -1,4 +1,7 @@ -0.0.20 (23 July 2006) +0.0.20.1 (25 July 2006) +- Fixed updating system on Windows + +0.0.20 (24 July 2006) - Added new hairstyle, and some fixes to the old ones - Added slider to set FPS limit - Added visible equipments diff --git a/configure.ac b/configure.ac index a4a3eef6..f1a52963 100755 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT([The Mana World], [0.0.20], [elvenprogrammer@gmail.com], [tmw]) +AC_INIT([The Mana World], [0.0.20.1], [elvenprogrammer@gmail.com], [tmw]) AC_CONFIG_HEADERS([config.h:config.h.in]) AC_LANG_CPLUSPLUS diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 8f43903f..3f5fe7bb 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -106,8 +106,7 @@ UpdaterWindow::~UpdaterWindow() free(mMemoryBuffer); } - // Remove downloaded files - remove((mBasePath + "/updates/news.txt").c_str()); + // Remove possibly leftover temporary download remove((mBasePath + "/updates/download.temp").c_str()); delete[] mCurlError; @@ -293,10 +292,14 @@ int UpdaterWindow::downloadThread(void *ptr) if (!uw->mStoreInMemory) { fclose(outfile); - // If the download was successful give the file the proper name - // else it will be deleted later + + // Give the file the proper name std::string newName(uw->mBasePath + "/updates/" + uw->mCurrentFile.c_str()); + + // Any existing file with this name is deleted first, otherwise the + // rename will fail on Windows. + remove(newName.c_str()); rename(outFilename.c_str(), newName.c_str()); } } |