1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-21 21:57:01 +00:00

Update PrefsController:

Use [[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] instead of using NSString's creation.
This commit is contained in:
C.W. Betts 2019-07-21 15:04:09 -06:00
parent cabffe76eb
commit 751200f59a

View file

@ -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