- updated pt translation (thanks to almosthumane)
- Added/updated some Themes by Ilya B
- Added a random wallpaper loading at loading screen (see wallpapers.txt in Res/graphics)
- Saving decks and collection should now be a bit more secure (attempt at minimizing issue 393)
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-05-02 12:49:36 +00:00
parent c26f453b16
commit 755bb04475
54 changed files with 304 additions and 176 deletions
+5 -1
View File
@@ -687,7 +687,9 @@ int MTGDeck::remove(MTGCard * card){
}
int MTGDeck::save(){
std::ofstream file(filename.c_str());
string tmp = filename;
tmp.append(".tmp"); //not thread safe
std::ofstream file(tmp.c_str());
char writer[512];
if (file){
#if defined (WIN32) || defined (LINUX)
@@ -716,6 +718,8 @@ int MTGDeck::save(){
}
}
file.close();
std::remove(filename.c_str());
rename(tmp.c_str(),filename.c_str());
}
DeckMetaDataList::decksMetaData->invalidate(filename);
return 1;