mirror of
https://github.com/transmission/transmission
synced 2025-02-02 20:43:51 +00:00
better handle non-UTF8 error messages
This commit is contained in:
parent
a14208fbf6
commit
546f93177b
1 changed files with 11 additions and 1 deletions
|
@ -955,7 +955,17 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
- (NSString *) errorMessage
|
- (NSString *) errorMessage
|
||||||
{
|
{
|
||||||
return [self isError] ? [NSString stringWithUTF8String: fStat->errorString] : @"";
|
if (![self isError])
|
||||||
|
return @"";
|
||||||
|
|
||||||
|
#warning localize string after release
|
||||||
|
NSString * error;
|
||||||
|
if (!(error = [NSString stringWithUTF8String: fStat->errorString])
|
||||||
|
&& !(error = [NSString stringWithCString: fStat->errorString encoding: NSISOLatin1StringEncoding]))
|
||||||
|
error = @"";
|
||||||
|
//error = NSLocalizedString(@"(unreadable error)", "Torrent -> error string unreadable");
|
||||||
|
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) justFinished
|
- (BOOL) justFinished
|
||||||
|
|
Loading…
Reference in a new issue