From 751200f59a0bc4a579946289c6811939c4de4fc5 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Sun, 21 Jul 2019 15:04:09 -0600 Subject: [PATCH] Update PrefsController: Use [[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] instead of using NSString's creation. --- macosx/PrefsController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index 5be411dd0..a9595994d 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -1320,7 +1320,8 @@ const BOOL doneScriptEnabled = tr_sessionIsTorrentDoneScriptEnabled(fHandle); [fDefaults setBool: doneScriptEnabled forKey: @"DoneScriptEnabled"]; - NSString * doneScriptPath = @(tr_sessionGetTorrentDoneScript(fHandle)); + const char * doneScriptCStr = tr_sessionGetTorrentDoneScript(fHandle); + NSString * doneScriptPath = [[NSFileManager defaultManager] stringWithFileSystemRepresentation: doneScriptCStr length: strlen(doneScriptCStr)]; [fDefaults setObject: doneScriptPath forKey: @"DoneScriptPath"]; //update gui if loaded