Skip to content
Browse files

Fixes #210 <http://hunch.lighthouseapp.com/projects/66522-kod/tickets…

  • Loading branch information...
1 parent 1622dc0 commit 6c615d7662e327f2bd4a9d019800471157e73c7a @rsms committed Apr 24, 2011
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/KToolbarController.mm
View
8 src/KToolbarController.mm
@@ -114,13 +114,7 @@ - (void)updateURLFromCurrentContents {
if (!url) {
[locationBarTextField_ setStringValue:@""];
} else if ([url isFileURL]) {
- NSString *path = [url path];
- NSString *homePath = NSHomeDirectory();
- NSRange prefixRange = NSMakeRange(0, homePath.length);
- path = [path stringByReplacingOccurrencesOfString:homePath
- withString:@"~"
- options:NSLiteralSearch
- range:prefixRange];
+ NSString *path = [[url path] stringByAbbreviatingWithTildeInPath];
[locationBarTextField_ setStringValue:path];
} else {
[locationBarTextField_ setStringValue:[url description]];

0 comments on commit 6c615d7

Please sign in to comment.
Something went wrong with that request. Please try again.