From 00bb8525c973fc583137c7bc307d3cff76ad24d5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 21 Dec 2015 14:10:10 +0100 Subject: Print a warning when operating on a file that doesn't exist. --- common/storage_lmdb.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index ef3363a..b9b86aa 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp @@ -595,6 +595,9 @@ Storage::Transaction Storage::createTransaction(AccessMode type, const std::func qint64 Storage::diskUsage() const { QFileInfo info(d->storageRoot + '/' + d->name + "/data.mdb"); + if (!info.exists()) { + qWarning() << "Tried to get filesize for non-existant file: " << info.path(); + } return info.size(); } -- cgit v1.2.3