Fix crash on 10.8

This commit is contained in:
1024jp 2015-02-03 08:45:29 +09:00
parent 81b064f5c9
commit ade5029f73
2 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@
Change Log
==========================
2.1.0
2.1.0-beta.3
--------------------------
### Additions/Changes
@ -11,6 +11,11 @@ Change Log
- [beta] close popover on clicking regex help button if it's already shown.
### Fixes
- [beta] Fix an issue where application could crash on Mountain Lion.
2.1.0-beta.2
--------------------------

View File

@ -44,7 +44,7 @@ static char const XATTR_ENCODING_NAME[] = "com.apple.TextEncoding";
{
// get xattr data
NSMutableData* data = nil;
const char *path = [self fileSystemRepresentation];
const char *path = [[self path] UTF8String];
ssize_t bufferSize = getxattr(path, XATTR_ENCODING_NAME, NULL, 0, 0, XATTR_NOFOLLOW);
if (bufferSize > 0) {
data = [NSMutableData dataWithLength:bufferSize];
@ -86,7 +86,7 @@ static char const XATTR_ENCODING_NAME[] = "com.apple.TextEncoding";
if (!data) { return; }
setxattr([self fileSystemRepresentation], XATTR_ENCODING_NAME, [data bytes], [data length], 0, XATTR_NOFOLLOW);
setxattr([[self path] UTF8String], XATTR_ENCODING_NAME, [data bytes], [data length], 0, XATTR_NOFOLLOW);
}
@end