log: Use LogError for fatal errors

This commit is contained in:
MarcoFalke
2025-11-27 10:31:30 +01:00
parent 22229de728
commit fa0018d011
10 changed files with 46 additions and 46 deletions

View File

@@ -41,11 +41,11 @@ FILE* FlatFileSeq::Open(const FlatFilePos& pos, bool read_only) const
if (!file && !read_only)
file = fsbridge::fopen(path, "wb+");
if (!file) {
LogPrintf("Unable to open file %s\n", fs::PathToString(path));
LogError("Unable to open file %s", fs::PathToString(path));
return nullptr;
}
if (pos.nPos && fseek(file, pos.nPos, SEEK_SET)) {
LogPrintf("Unable to seek to position %u of %s\n", pos.nPos, fs::PathToString(path));
LogError("Unable to seek to position %u of %s", pos.nPos, fs::PathToString(path));
if (fclose(file) != 0) {
LogError("Unable to close file %s", fs::PathToString(path));
}