mirror of
https://github.com/transmission/transmission
synced 2024-12-29 02:56:11 +00:00
Paths converted from NSString objects to C strings should be acquired using “-fileSystemRepresentation”.
The file system APIs on OS X have specific requirements concerning the Unicode normalization form.
This commit is contained in:
parent
e60e75fadc
commit
4a9a48853b
1 changed files with 7 additions and 3 deletions
|
@ -845,7 +845,8 @@
|
||||||
[fDefaults setBool: YES forKey: @"DownloadLocationConstant"];
|
[fDefaults setBool: YES forKey: @"DownloadLocationConstant"];
|
||||||
[self updateShowAddMagnetWindowField];
|
[self updateShowAddMagnetWindowField];
|
||||||
|
|
||||||
tr_sessionSetDownloadDir(fHandle, [folder UTF8String]);
|
assert(folder.length > 0);
|
||||||
|
tr_sessionSetDownloadDir(fHandle, [folder fileSystemRepresentation]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -871,7 +872,8 @@
|
||||||
NSString * folder = [[[panel URLs] objectAtIndex: 0] path];
|
NSString * folder = [[[panel URLs] objectAtIndex: 0] path];
|
||||||
[fDefaults setObject: folder forKey: @"IncompleteDownloadFolder"];
|
[fDefaults setObject: folder forKey: @"IncompleteDownloadFolder"];
|
||||||
|
|
||||||
tr_sessionSetIncompleteDir(fHandle, [folder UTF8String]);
|
assert(folder.length > 0);
|
||||||
|
tr_sessionSetIncompleteDir(fHandle, [folder fileSystemRepresentation]);
|
||||||
}
|
}
|
||||||
[fIncompleteFolderPopUp selectItemAtIndex: 0];
|
[fIncompleteFolderPopUp selectItemAtIndex: 0];
|
||||||
}];
|
}];
|
||||||
|
@ -892,8 +894,10 @@
|
||||||
{
|
{
|
||||||
NSString * filePath = [[[panel URLs] objectAtIndex: 0] path];
|
NSString * filePath = [[[panel URLs] objectAtIndex: 0] path];
|
||||||
|
|
||||||
|
assert(filePath.length > 0);
|
||||||
|
|
||||||
[fDefaults setObject: filePath forKey: @"DoneScriptPath"];
|
[fDefaults setObject: filePath forKey: @"DoneScriptPath"];
|
||||||
tr_sessionSetTorrentDoneScript(fHandle, [filePath UTF8String]);
|
tr_sessionSetTorrentDoneScript(fHandle, [filePath fileSystemRepresentation]);
|
||||||
|
|
||||||
[fDefaults setBool: YES forKey: @"DoneScriptEnabled"];
|
[fDefaults setBool: YES forKey: @"DoneScriptEnabled"];
|
||||||
tr_sessionSetTorrentDoneScriptEnabled(fHandle, YES);
|
tr_sessionSetTorrentDoneScriptEnabled(fHandle, YES);
|
||||||
|
|
Loading…
Reference in a new issue