diff --git a/Source/NSString.m b/Source/NSString.m index 919249a51..a867d6f05 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -3543,18 +3543,19 @@ static NSFileManager *fm = nil; { if (pathSepMember(buf[aLength]) == YES) { + buf[aLength] = '/'; // Standardise if (pathSepMember(buf[aLength-1]) == YES) { unsigned pos; + unsigned n = 1; + buf[aLength-1] = '/'; // Standardise for (pos = aLength+1; pos < length; pos++) { buf[pos-1] = buf[pos]; } length--; - aLength--; } - buf[aLength] = '/'; // Standardise } aLength--; }