mgrLM // Remove commented-out deprecated EOF fixer.

This commit is contained in:
ShikiSuen 2022-03-28 22:49:31 +08:00
parent b0886a2f5c
commit d2e764c391
1 changed files with 0 additions and 18 deletions

View File

@ -218,24 +218,6 @@ static void LTLoadLanguageModelFile(NSString *filenameWithoutExtension, vChewing
// BOOL addLineBreakAtFront = NO; // BOOL addLineBreakAtFront = NO;
NSString *path = areWeDeleting ? [self excludedPhrasesDataPath:mode] : [self userPhrasesDataPath:mode]; NSString *path = areWeDeleting ? [self excludedPhrasesDataPath:mode] : [self userPhrasesDataPath:mode];
// if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {
// NSError *error = nil;
// NSDictionary *attr = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:&error];
// unsigned long long fileSize = [attr fileSize];
// if (!error && fileSize) {
// NSFileHandle *readFile = [NSFileHandle fileHandleForReadingAtPath:path];
// if (readFile) {
// [readFile seekToFileOffset:fileSize - 1];
// NSData *data = [readFile readDataToEndOfFile];
// const void *bytes = [data bytes];
// if (*(char *)bytes != '\n') {
// addLineBreakAtFront = YES;
// }
// [readFile closeFile];
// }
// }
// }
NSMutableString *currentMarkedPhrase = [NSMutableString string]; NSMutableString *currentMarkedPhrase = [NSMutableString string];
// if (addLineBreakAtFront) { // if (addLineBreakAtFront) {
// [currentMarkedPhrase appendString:@"\n"]; // [currentMarkedPhrase appendString:@"\n"];