зеркало из https://github.com/mozilla/pjs.git
correctly launch if any non-ascii chars are in the path. bug 148432
This commit is contained in:
Родитель
4d61012cd9
Коммит
c7a9abfa6a
|
@ -54,12 +54,8 @@ extern const char *prefContractID;
|
||||||
|
|
||||||
- (BOOL) initMozillaPrefs
|
- (BOOL) initMozillaPrefs
|
||||||
{
|
{
|
||||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
NSString *path = [[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent];
|
||||||
NSString *path = [mainBundle bundlePath];
|
setenv("MOZILLA_FIVE_HOME", [path fileSystemRepresentation], 1);
|
||||||
NSMutableString *mutablePath = [NSMutableString stringWithString:path];
|
|
||||||
[mutablePath appendString:@"/Contents/MacOS/"];
|
|
||||||
const char *cstr = [mutablePath cString];
|
|
||||||
setenv("MOZILLA_FIVE_HOME", cstr, 1);
|
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
rv = NS_InitEmbedding(nsnull, nsnull);
|
rv = NS_InitEmbedding(nsnull, nsnull);
|
||||||
|
|
|
@ -54,12 +54,8 @@ extern const char *prefContractID;
|
||||||
|
|
||||||
- (BOOL) initMozillaPrefs
|
- (BOOL) initMozillaPrefs
|
||||||
{
|
{
|
||||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
NSString *path = [[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent];
|
||||||
NSString *path = [mainBundle bundlePath];
|
setenv("MOZILLA_FIVE_HOME", [path fileSystemRepresentation], 1);
|
||||||
NSMutableString *mutablePath = [NSMutableString stringWithString:path];
|
|
||||||
[mutablePath appendString:@"/Contents/MacOS/"];
|
|
||||||
const char *cstr = [mutablePath cString];
|
|
||||||
setenv("MOZILLA_FIVE_HOME", cstr, 1);
|
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
rv = NS_InitEmbedding(nsnull, nsnull);
|
rv = NS_InitEmbedding(nsnull, nsnull);
|
||||||
|
|
|
@ -54,12 +54,8 @@ extern const char *prefContractID;
|
||||||
|
|
||||||
- (BOOL) initMozillaPrefs
|
- (BOOL) initMozillaPrefs
|
||||||
{
|
{
|
||||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
NSString *path = [[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent];
|
||||||
NSString *path = [mainBundle bundlePath];
|
setenv("MOZILLA_FIVE_HOME", [path fileSystemRepresentation], 1);
|
||||||
NSMutableString *mutablePath = [NSMutableString stringWithString:path];
|
|
||||||
[mutablePath appendString:@"/Contents/MacOS/"];
|
|
||||||
const char *cstr = [mutablePath cString];
|
|
||||||
setenv("MOZILLA_FIVE_HOME", cstr, 1);
|
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
rv = NS_InitEmbedding(nsnull, nsnull);
|
rv = NS_InitEmbedding(nsnull, nsnull);
|
||||||
|
|
|
@ -54,12 +54,8 @@ extern const char *prefContractID;
|
||||||
|
|
||||||
- (BOOL) initMozillaPrefs
|
- (BOOL) initMozillaPrefs
|
||||||
{
|
{
|
||||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
NSString *path = [[[NSBundle mainBundle] executablePath] stringByDeletingLastPathComponent];
|
||||||
NSString *path = [mainBundle bundlePath];
|
setenv("MOZILLA_FIVE_HOME", [path fileSystemRepresentation], 1);
|
||||||
NSMutableString *mutablePath = [NSMutableString stringWithString:path];
|
|
||||||
[mutablePath appendString:@"/Contents/MacOS/"];
|
|
||||||
const char *cstr = [mutablePath cString];
|
|
||||||
setenv("MOZILLA_FIVE_HOME", cstr, 1);
|
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
rv = NS_InitEmbedding(nsnull, nsnull);
|
rv = NS_InitEmbedding(nsnull, nsnull);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче