mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 11:25:57 +03:00
Fix crash on 10.8
This commit is contained in:
parent
81b064f5c9
commit
ade5029f73
@ -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
|
||||
--------------------------
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user