mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +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();
|
||||
}
|
||||
_valid = false;
|
||||
_mapped = nullptr;
|
||||
|
||||
if (_file.open(QFile::ReadWrite)) {
|
||||
_mapped = _file.map(0, _file.size());
|
||||
|
@ -113,8 +114,10 @@ void FileStorage::ensureWriteAccess() {
|
|||
_hasWriteAccess = true;
|
||||
} else {
|
||||
qCWarning(storagelogging) << "Failed to map file " << _file.fileName();
|
||||
throw std::runtime_error("Failed to map file");
|
||||
}
|
||||
} else {
|
||||
qCWarning(storagelogging) << "Failed to open file " << _file.fileName();
|
||||
throw std::runtime_error("Failed to open file");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue