diff --git a/contrib/mobile/iOS/Onelab/ModelViewController.mm b/contrib/mobile/iOS/Onelab/ModelViewController.mm index b8ceaa7b3f0bee7558110e399d9a440836cd5965..a8049674c278afa16bb5fb8898ce1b470e09f268 100644 --- a/contrib/mobile/iOS/Onelab/ModelViewController.mm +++ b/contrib/mobile/iOS/Onelab/ModelViewController.mm @@ -315,7 +315,13 @@ -(void)addError:(std::string)msg { AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate; - [appDelegate->errors addObject:[Utils getStringFromCString:msg.c_str()]]; + NSString *str = [Utils getStringFromCString:msg.c_str()]; + // remove document path from error message + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *docPath = [[paths objectAtIndex:0] stringByAppendingString:@"/"]; + str = [str stringByReplacingOccurrencesOfString:docPath + withString:@""]; + [appDelegate->errors addObject:str]; } -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex