Deprecating EOF Fix in FastLM.

- Its mission is complete. All user-editable LM files are not parsed by FastLM.
This commit is contained in:
ShikiSuen 2022-01-27 21:40:18 +08:00
parent a794b5ca4a
commit 5412ab66ba
1 changed files with 0 additions and 16 deletions

View File

@ -36,22 +36,6 @@ bool FastLM::open(const char *path)
return false;
}
fstream zfd(path);
zfd.seekg(-1,ios_base::end);
char z;
zfd.get(z);
if(z!='\n'){
syslog(LOG_CONS, "REPORT: Core Language Data file is not ended with a new line.\n");
syslog(LOG_CONS, "PROCEDURE: Trying to insert a new line as EOF before per-line check process.\n");
ofstream zfdo(path, std::ios_base::app);
zfdo << std::endl;
zfdo.close();
if (zfdo.fail()) {
syslog(LOG_CONS, "REPORT: Failed to append a newline to the data file. Insufficient Privileges?\n");
return false;
}
}
fd = ::open(path, O_RDONLY);
if (fd == -1) {
return false;