do it atomically;

This commit is contained in:
tianTian 2013-04-16 12:38:53 +08:00
parent 91ddfe7382
commit 9a04eee8d1
1 changed files with 2 additions and 2 deletions

View File

@ -318,8 +318,8 @@ bool CCFileUtilsIOS::writeToFile(CCDictionary *dict, const std::string &fullPath
}
NSString *file = [NSString stringWithUTF8String:fullPath.c_str()];
// no one else will write this file
[nsDict writeToFile:file atomically:NO];
// do it atomically
[nsDict writeToFile:file atomically:YES];
return true;
}