mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Set launch directory before AbsolutePathOfExecutable() needs it.
This commit is contained in:
parent
597d10d9cf
commit
4a4a802060
1 changed files with 5 additions and 6 deletions
|
@ -55,14 +55,18 @@
|
|||
|
||||
#import "GSPrivate.h"
|
||||
|
||||
/* Store the working directory at startup */
|
||||
static NSString *_launchDirectory = nil;
|
||||
|
||||
static NSFileManager *
|
||||
manager()
|
||||
{
|
||||
static NSFileManager *mgr = nil;
|
||||
|
||||
if (mgr == nil)
|
||||
if (nil == mgr)
|
||||
{
|
||||
mgr = RETAIN([NSFileManager defaultManager]);
|
||||
ASSIGN(_launchDirectory, [mgr currentDirectoryPath]);
|
||||
[[NSObject leakAt: &mgr] release];
|
||||
}
|
||||
return mgr;
|
||||
|
@ -186,9 +190,6 @@ static NSMapTable *_bundles = NULL;
|
|||
static NSMapTable *_byClass = NULL;
|
||||
static NSMapTable *_byIdentifier = NULL;
|
||||
|
||||
/* Store the working directory at startup */
|
||||
static NSString *_launchDirectory = nil;
|
||||
|
||||
static NSString *_base_version
|
||||
= OBJC_STRINGIFY(GNUSTEP_BASE_MAJOR_VERSION.GNUSTEP_BASE_MINOR_VERSION);
|
||||
|
||||
|
@ -1719,8 +1720,6 @@ GSPrivateInfoDictionary(NSString *rootPath)
|
|||
if ((str = [env objectForKey: @"LIBRARY_COMBO"]) != nil)
|
||||
library_combo = RETAIN(str);
|
||||
|
||||
_launchDirectory = RETAIN([manager() currentDirectoryPath]);
|
||||
|
||||
_gnustep_bundle = RETAIN([self bundleForLibrary: @"gnustep-base"
|
||||
version: _base_version]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue