Deprecating EOF Fix in FastLM.
- Its mission is complete. All user-editable LM files are not parsed by FastLM.
This commit is contained in:
parent
a794b5ca4a
commit
5412ab66ba
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue