mirror of
https://github.com/overte-org/overte.git
synced 2025-07-28 18:00:21 +02:00
Allow creation of empty files with storage API
This commit is contained in:
parent
6e3ce95c3c
commit
001edcd71b
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ StoragePointer FileStorage::create(const QString& filename, size_t size, const u
|
||||||
if (!file.resize(size)) {
|
if (!file.resize(size)) {
|
||||||
throw std::runtime_error("Unable to resize file");
|
throw std::runtime_error("Unable to resize file");
|
||||||
}
|
}
|
||||||
{
|
if (data) {
|
||||||
auto mapped = file.map(0, size);
|
auto mapped = file.map(0, size);
|
||||||
if (!mapped) {
|
if (!mapped) {
|
||||||
throw std::runtime_error("Unable to map file");
|
throw std::runtime_error("Unable to map file");
|
||||||
|
|
Loading…
Reference in a new issue