mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
CR
This commit is contained in:
parent
e0863aa50f
commit
6378b96b4c
1 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,7 @@ void FileStorage::ensureWriteAccess() {
|
||||||
_file.close();
|
_file.close();
|
||||||
}
|
}
|
||||||
_valid = false;
|
_valid = false;
|
||||||
|
_mapped = nullptr;
|
||||||
|
|
||||||
if (_file.open(QFile::ReadWrite)) {
|
if (_file.open(QFile::ReadWrite)) {
|
||||||
_mapped = _file.map(0, _file.size());
|
_mapped = _file.map(0, _file.size());
|
||||||
|
@ -113,8 +114,10 @@ void FileStorage::ensureWriteAccess() {
|
||||||
_hasWriteAccess = true;
|
_hasWriteAccess = true;
|
||||||
} else {
|
} else {
|
||||||
qCWarning(storagelogging) << "Failed to map file " << _file.fileName();
|
qCWarning(storagelogging) << "Failed to map file " << _file.fileName();
|
||||||
|
throw std::runtime_error("Failed to map file");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCWarning(storagelogging) << "Failed to open file " << _file.fileName();
|
qCWarning(storagelogging) << "Failed to open file " << _file.fileName();
|
||||||
|
throw std::runtime_error("Failed to open file");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue