mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
fixup potential invalid index error
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27702 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4fc120d2f4
commit
1613ab58b5
1 changed files with 2 additions and 2 deletions
|
@ -4072,8 +4072,8 @@ static NSFileManager *fm = nil;
|
|||
}
|
||||
r.length = l - r.location;
|
||||
}
|
||||
// Remove trailing ('.') component.
|
||||
if (l > root && (*caiImp)(s, caiSel, l-1) == '.'
|
||||
// Remove trailing ('.') as long as it's preceeded by a path separator.
|
||||
if (l > root && l > 1 && (*caiImp)(s, caiSel, l-1) == '.'
|
||||
&& pathSepMember((*caiImp)(s, caiSel, l-2)) == YES)
|
||||
{
|
||||
l--;
|
||||
|
|
Loading…
Reference in a new issue