mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
Update PrefsController:
Use [[NSFileManager defaultManager] stringWithFileSystemRepresentation:length:] instead of using NSString's creation.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user