Allow creation of empty files with storage API

This commit is contained in:
Brad Davis 2018-01-11 08:06:52 -08:00
parent 6e3ce95c3c
commit 001edcd71b

View file

@ -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");