diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-21 14:10:10 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-12-21 14:10:10 +0100 |
commit | 00bb8525c973fc583137c7bc307d3cff76ad24d5 (patch) | |
tree | b733cefa3822fc08ff280ee40ce6d355e67835d3 /common/storage_lmdb.cpp | |
parent | 9c334f19d781b8ea42919fb974b45df1d7544867 (diff) | |
download | sink-00bb8525c973fc583137c7bc307d3cff76ad24d5.tar.gz sink-00bb8525c973fc583137c7bc307d3cff76ad24d5.zip |
Print a warning when operating on a file that doesn't exist.
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r-- | common/storage_lmdb.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
595 | qint64 Storage::diskUsage() const | 595 | qint64 Storage::diskUsage() const |
596 | { | 596 | { |
597 | QFileInfo info(d->storageRoot + '/' + d->name + "/data.mdb"); | 597 | QFileInfo info(d->storageRoot + '/' + d->name + "/data.mdb"); |
598 | if (!info.exists()) { | ||
599 | qWarning() << "Tried to get filesize for non-existant file: " << info.path(); | ||
600 | } | ||
598 | return info.size(); | 601 | return info.size(); |
599 | } | 602 | } |
600 | 603 | ||