mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Implemented properly NSUserDirectory
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24780 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
40d40e3a1a
commit
2d0d7623b7
5 changed files with 145 additions and 25 deletions
|
@ -149,6 +149,10 @@ static NSString *tempDir = nil; /* user's temporary directory */
|
|||
/* The following list entirely describe our filesystem configuration. */
|
||||
static NSString *gnustepMakefiles = nil;
|
||||
|
||||
static NSString *gnustepSystemUsersDir = nil;
|
||||
static NSString *gnustepNetworkUsersDir = nil;
|
||||
static NSString *gnustepLocalUsersDir = nil;
|
||||
|
||||
static NSString *gnustepSystemApps = nil;
|
||||
static NSString *gnustepSystemAdminApps = nil;
|
||||
static NSString *gnustepSystemWebApps = nil;
|
||||
|
@ -324,6 +328,10 @@ static void ExtractValuesFromConfig(NSDictionary *config)
|
|||
|
||||
ASSIGN_PATH(gnustepMakefiles, c, @"GNUSTEP_MAKEFILES");
|
||||
|
||||
ASSIGN_PATH(gnustepSystemUsersDir, c, @"GNUSTEP_SYSTEM_USERS_DIR");
|
||||
ASSIGN_PATH(gnustepNetworkUsersDir, c, @"GNUSTEP_NETWORK_USERS_DIR");
|
||||
ASSIGN_PATH(gnustepLocalUsersDir, c, @"GNUSTEP_LOCAL_USERS_DIR");
|
||||
|
||||
ASSIGN_PATH(gnustepSystemApps, c, @"GNUSTEP_SYSTEM_APPS");
|
||||
ASSIGN_PATH(gnustepSystemAdminApps, c, @"GNUSTEP_SYSTEM_ADMIN_APPS");
|
||||
ASSIGN_PATH(gnustepSystemWebApps, c, @"GNUSTEP_SYSTEM_WEB_APPS");
|
||||
|
@ -563,6 +571,10 @@ static void ExtractValuesFromConfig(NSDictionary *config)
|
|||
ASSIGN_DEFAULT_PATH(gnustepLocalDocumentationInfo, @GNUSTEP_TARGET_LOCAL_DOC_INFO);
|
||||
|
||||
ASSIGN_DEFAULT_PATH(gnustepMakefiles, @GNUSTEP_TARGET_MAKEFILES);
|
||||
|
||||
ASSIGN_DEFAULT_PATH(gnustepSystemUsersDir, @GNUSTEP_TARGET_SYSTEM_USERS_DIR);
|
||||
ASSIGN_DEFAULT_PATH(gnustepNetworkUsersDir, @GNUSTEP_TARGET_NETWORK_USERS_DIR);
|
||||
ASSIGN_DEFAULT_PATH(gnustepLocalUsersDir, @GNUSTEP_TARGET_LOCAL_USERS_DIR);
|
||||
}
|
||||
|
||||
NSMutableDictionary*
|
||||
|
@ -795,6 +807,10 @@ static void ShutdownPathUtilities(void)
|
|||
|
||||
DESTROY(gnustepMakefiles);
|
||||
|
||||
DESTROY(gnustepSystemUsersDir);
|
||||
DESTROY(gnustepNetworkUsersDir);
|
||||
DESTROY(gnustepLocalUsersDir);
|
||||
|
||||
DESTROY(gnustepSystemApps);
|
||||
DESTROY(gnustepSystemAdminApps);
|
||||
DESTROY(gnustepSystemWebApps);
|
||||
|
@ -1745,10 +1761,13 @@ if (domainMask & mask) \
|
|||
|
||||
case NSUserDirectory:
|
||||
{
|
||||
if (domainMask & NSUserDomainMask)
|
||||
{
|
||||
[paths addObject: gnustepUserHome];
|
||||
}
|
||||
/* This is the directory in which user directories are located.
|
||||
* You can not have user directories in your own user directory,
|
||||
* so NSUserDomainMask will always return ''.
|
||||
*/
|
||||
ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalUsersDir);
|
||||
ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkUsersDir);
|
||||
ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemUsersDir);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue