mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
Don't include empty paths in search list
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24949 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
575a3e2f38
commit
7c04c56ef2
2 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
|||
* Source/NSPredicate.m: ([-parseOr]) Use orPredicateWithSubpredicates
|
||||
rather than andPredicateWithSubpredicates. Fix for bug #19446.
|
||||
* Source/unix/NSStream.m: Fix memory leak.
|
||||
* Source/NSPathUtilities.m: NSSearchPathForDirectoriesInDomains()
|
||||
Don't include empty paths.
|
||||
|
||||
2007-03-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -1622,13 +1622,13 @@ NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directoryKey,
|
|||
if (domainMask & mask) \
|
||||
{ \
|
||||
path = [base_dir stringByAppendingPathComponent: add_dir]; \
|
||||
if (path != nil && [paths containsObject: path] == NO) \
|
||||
if ([path length] > 0 && [paths containsObject: path] == NO) \
|
||||
[paths addObject: path]; \
|
||||
}
|
||||
#define ADD_PLATFORM_PATH(mask, add_dir) \
|
||||
if (domainMask & mask) \
|
||||
{ \
|
||||
if (add_dir != nil && [paths containsObject: add_dir] == NO) \
|
||||
if ([add_dir length] > 0 && [paths containsObject: add_dir] == NO) \
|
||||
[paths addObject: add_dir]; \
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue