diff --git a/camino/src/bookmarks/BookmarkManager.mm b/camino/src/bookmarks/BookmarkManager.mm index df984160519..9d11e3791cb 100644 --- a/camino/src/bookmarks/BookmarkManager.mm +++ b/camino/src/bookmarks/BookmarkManager.mm @@ -1712,20 +1712,19 @@ static BookmarkManager* gBookmarkManager = nil; BOOL success = [dict writeToFile:backupFile atomically:YES]; if (success) { - // XXX removed to measure hit on startup perf - // long long bmFileSize = [[NSFileManager defaultManager] sizeOfFileAtPath:backupFile traverseLink:YES]; - // if (bmFileSize > 0) + NSFileManager* fm = [NSFileManager defaultManager]; + long long bmFileSize = [fm sizeOfFileAtPath:backupFile traverseLink:YES]; + if (bmFileSize > 0) { - NSFileManager* fm = [NSFileManager defaultManager]; BOOL removedOld = [fm removeFileAtPath:stdPath handler:self]; // out with the old... BOOL movedNew = [fm movePath:backupFile toPath:stdPath handler:self]; // ... in with the new if (!removedOld || !movedNew) - NSLog(@"writePropertyList: move failed (removed old file at %@ %d, moved new file from %@ %d", + NSLog(@"writePropertyList: move failed (removed old file at %@ (OK %d), moved new file from %@ (OK %d)", stdPath, removedOld, backupFile, movedNew); } - // else - // NSLog(@"writePropertyList: saved bookmarks file was empty (%qi bytes))", bmFileSize); + else + NSLog(@"writePropertyList: saved bookmarks file was empty (%qi bytes))", bmFileSize); } else NSLog(@"writePropertyList: Failed to write file %@", pathToFile);