diff --git a/Source/NSPathCell.m b/Source/NSPathCell.m index 4d5952847..80d125595 100644 --- a/Source/NSPathCell.m +++ b/Source/NSPathCell.m @@ -317,7 +317,6 @@ static Class pathComponentCellClass; } [cell setImage: image]; - string = [string stringByDeletingLastPathComponent]; if ([array count] == 0) // the element we are adding is the last component that will show { @@ -331,6 +330,7 @@ static Class pathComponentCellClass; [array insertObject: cell atIndex: 0]; RELEASE(cell); + string = [string stringByDeletingLastPathComponent]; u = [NSURL URLWithString: string relativeToURL: nil]; if (u == nil && at_root == NO) diff --git a/Source/NSPathControl.m b/Source/NSPathControl.m index ae576ec1f..7081e95a1 100644 --- a/Source/NSPathControl.m +++ b/Source/NSPathControl.m @@ -336,7 +336,6 @@ static Class pathCellClass; } [[sender menu] close]; - // AUTORELEASE([sender menu]); } - (void) mouseDown: (NSEvent *)event @@ -355,7 +354,7 @@ static Class pathCellClass; NSPathComponentCell *c = nil; NSEnumerator *en = [array objectEnumerator]; - while((c = [en nextObject]) != nil) + while ((c = [en nextObject]) != nil) { NSURL *u = [c URL]; NSString *s = [[u path] lastPathComponent];