minor fixes

This commit is contained in:
Gregory John Casamento 2020-05-06 23:50:37 -04:00
parent c636211e0e
commit 8a5f5b180a
2 changed files with 2 additions and 3 deletions

View file

@ -317,7 +317,6 @@ static Class pathComponentCellClass;
} }
[cell setImage: image]; [cell setImage: image];
string = [string stringByDeletingLastPathComponent];
if ([array count] == 0) // the element we are adding is the last component that will show 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 [array insertObject: cell
atIndex: 0]; atIndex: 0];
RELEASE(cell); RELEASE(cell);
string = [string stringByDeletingLastPathComponent];
u = [NSURL URLWithString: string u = [NSURL URLWithString: string
relativeToURL: nil]; relativeToURL: nil];
if (u == nil && at_root == NO) if (u == nil && at_root == NO)

View file

@ -336,7 +336,6 @@ static Class pathCellClass;
} }
[[sender menu] close]; [[sender menu] close];
// AUTORELEASE([sender menu]);
} }
- (void) mouseDown: (NSEvent *)event - (void) mouseDown: (NSEvent *)event
@ -355,7 +354,7 @@ static Class pathCellClass;
NSPathComponentCell *c = nil; NSPathComponentCell *c = nil;
NSEnumerator *en = [array objectEnumerator]; NSEnumerator *en = [array objectEnumerator];
while((c = [en nextObject]) != nil) while ((c = [en nextObject]) != nil)
{ {
NSURL *u = [c URL]; NSURL *u = [c URL];
NSString *s = [[u path] lastPathComponent]; NSString *s = [[u path] lastPathComponent];