Improve last fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21048 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-04-05 09:36:52 +00:00
parent 734d473db4
commit 38cf42c7f8

View file

@ -3543,18 +3543,19 @@ static NSFileManager *fm = nil;
{ {
if (pathSepMember(buf[aLength]) == YES) if (pathSepMember(buf[aLength]) == YES)
{ {
buf[aLength] = '/'; // Standardise
if (pathSepMember(buf[aLength-1]) == YES) if (pathSepMember(buf[aLength-1]) == YES)
{ {
unsigned pos; unsigned pos;
unsigned n = 1;
buf[aLength-1] = '/'; // Standardise
for (pos = aLength+1; pos < length; pos++) for (pos = aLength+1; pos < length; pos++)
{ {
buf[pos-1] = buf[pos]; buf[pos-1] = buf[pos];
} }
length--; length--;
aLength--;
} }
buf[aLength] = '/'; // Standardise
} }
aLength--; aLength--;
} }