mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Allow bare "." as path name, but fix template to use "./"
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34012 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6a75007c0
commit
765e64da85
2 changed files with 28 additions and 24 deletions
|
@ -239,8 +239,8 @@ static void ShutdownPathUtilities(void);
|
|||
})
|
||||
|
||||
/* Grab a path from the config file, making it relative to the config
|
||||
* file location if it begins with './' or '../', and checking that the
|
||||
* result is an absolute path.
|
||||
* file location if it is '.' or begins with './' or '../', and checking
|
||||
* that the result is an absolute path.
|
||||
*/
|
||||
#define ASSIGN_PATH(var, dictionary, key) ({\
|
||||
id val = getPathConfig(dictionary, key);\
|
||||
|
@ -361,7 +361,11 @@ substUser(NSString *str)
|
|||
static inline NSString *
|
||||
getPath(NSString *path)
|
||||
{
|
||||
if ([path hasPrefix: @"./"] == YES)
|
||||
if ([path isEqualToString: @"."] == YES)
|
||||
{
|
||||
path = gnustepConfigPath;
|
||||
}
|
||||
else if ([path hasPrefix: @"./"] == YES)
|
||||
{
|
||||
path = [gnustepConfigPath stringByAppendingPathComponent:
|
||||
[path substringFromIndex: 2]];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue