mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-29 09:01:05 +00:00
Remove username in simulator build only
Removing username from paths only makes sense in the simulator
This commit is contained in:
parent
27e5bb0085
commit
3c17cda93f
@ -344,10 +344,12 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
|
||||
processPath = report.processInfo.processPath;
|
||||
|
||||
/* Remove username from the path */
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
if ([processPath length] > 0)
|
||||
processPath = [processPath stringByAbbreviatingWithTildeInPath];
|
||||
if ([processPath length] > 0 && [[processPath substringToIndex:1] isEqualToString:@"~"])
|
||||
processPath = [NSString stringWithFormat:@"/Users/USER%@", [processPath substringFromIndex:1]];
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Parent Process Name */
|
||||
@ -562,11 +564,17 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
|
||||
|
||||
/* Remove username from the image path */
|
||||
NSString *imageName = @"";
|
||||
if (imageInfo.imageName && [imageInfo.imageName length] > 0)
|
||||
if (imageInfo.imageName && [imageInfo.imageName length] > 0) {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
imageName = [imageInfo.imageName stringByAbbreviatingWithTildeInPath];
|
||||
#else
|
||||
imageName = imageInfo.imageName;
|
||||
#endif
|
||||
}
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
if ([imageName length] > 0 && [[imageName substringToIndex:1] isEqualToString:@"~"])
|
||||
imageName = [NSString stringWithFormat:@"/Users/USER%@", [imageName substringFromIndex:1]];
|
||||
|
||||
#endif
|
||||
[text appendFormat: fmt,
|
||||
imageInfo.imageBaseAddress,
|
||||
imageInfo.imageBaseAddress + (MAX(1, imageInfo.imageSize) - 1), // The Apple format uses an inclusive range
|
||||
|
Loading…
x
Reference in New Issue
Block a user