Skip to content

Commit

Permalink
Use absolute path
Browse files Browse the repository at this point in the history
Closes #128
  • Loading branch information
kainjow committed Apr 9, 2018
1 parent e8ce78f commit 766f544
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hexf/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ int main(int argc __unused, const char * argv[] __unused) {
fprintf(stderr, "Only one file can be specified when diff argument is used.\n");
return EXIT_FAILURE;
}
[filesToOpen addObject:arg];
NSURL *url = [NSURL fileURLWithPath:arg];
NSString *path = url.path; // get absolute path
[filesToOpen addObject:path];
}
NSString *appIdentifier = @"com.ridiculousfish.HexFiend";
NSRunningApplication* app = [[NSRunningApplication runningApplicationsWithBundleIdentifier:appIdentifier] firstObject];
Expand Down

0 comments on commit 766f544

Please sign in to comment.