Permalink
Browse files

because timestamp of files pulled from device is arbitrary, delete ol…

…d profiles before creating new one
  • Loading branch information...
1 parent b588f7b commit 971fb9102af684963e434cc27fb94988a92e34de Aaron Sarazan committed Feb 14, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 Classes/CCInstrumentingProfiler.mm
@@ -208,7 +208,8 @@ + (void)messageThreadMain;
{
int pid = [[NSProcessInfo processInfo] processIdentifier];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- for (NSString *partial in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[paths objectAtIndex:0] error:NULL]) {
+ for (NSString *partial in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[paths objectAtIndex:0]
+ error:NULL]) {
if ([partial hasPrefix:@"profile-"]) {
NSString *docPath = [[paths objectAtIndex:0] stringByAppendingFormat:@"/%@", partial];
[[NSFileManager defaultManager] removeItemAtPath:docPath error:NULL];

0 comments on commit 971fb91

Please sign in to comment.