Show
Ignore:
Timestamp:
02/23/2010 04:51:22 PM (2 years ago)
Author:
gbooker
Message:

Better handle files without extensions and preserve the lookup name better.
Fixes #283

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/PlayerFramework/SapphireFrappliance/Browser/SapphireMarkMenu.m

    r1092 r1165  
    289289                 
    290290                NSString *prettyName = [fileMeta prettyName]; 
    291                 if(prettyName != nil && [[[[fileMeta path] lastPathComponent] stringByDeletingPathExtension] caseInsensitiveCompare:prettyName] != NSOrderedSame) 
     291                if(prettyName != nil && [[fileMeta fileName] caseInsensitiveCompare:prettyName] != NSOrderedSame) 
    292292                { 
    293293                        [marks insertObject: 
     
    469469                NSString *savePath = [[joinList objectAtIndex:0] path]; 
    470470                BOOL hasmovExt = [[savePath pathExtension] isEqualToString:@"mov"]; 
    471                 NSString *base = [savePath stringByDeletingPathExtension]; 
     471                NSString *base = [[joinList objectAtIndex:0] extensionlessPath]; 
    472472                if([[base lowercaseString] hasSuffix:@" part 1"]) 
    473473                        base = [base substringToIndex:[base length] - 7]; 
     
    750750                        { 
    751751                                NSString *title = [NSString stringWithFormat:BRLocalizedString(@"Rename %@", @"Rename a file, directory, or collection, argument is path"), [fileMeta path]]; 
    752                                 NSString *oldName = [[[fileMeta path] lastPathComponent] stringByDeletingPathExtension]; 
     752                                NSString *oldName = [fileMeta fileName]; 
    753753                                 
    754754                                NSInvocation *invoke = [NSInvocation invocationWithMethodSignature:[fileMeta methodSignatureForSelector:@selector(rename:)]];