mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 19:12:36 +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)) {
|
||||
throw std::runtime_error("Unable to resize file");
|
||||
}
|
||||
{
|
||||
if (data) {
|
||||
auto mapped = file.map(0, size);
|
||||
if (!mapped) {
|
||||
throw std::runtime_error("Unable to map file");
|
||||
|
|
Loading…
Reference in a new issue