From 35eb41daf94ece8843bda1a0ba68cd92d031eed6 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 31 Mar 2015 18:31:21 +0200 Subject: will now avoid writing plugin lists if they would be empty (as its probably a bug) --- src/pluginlist.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/pluginlist.cpp') diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index cccb7d12..94c6340e 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -446,8 +446,12 @@ void PluginList::writePlugins(const QString &fileName, bool writeUnchecked) cons "Please see mo_interface.log for a list of affected plugins and rename them.")); } - if (file.commitIfDifferent(m_LastSaveHash[fileName])) { - qDebug("%s saved", QDir::toNativeSeparators(fileName).toUtf8().constData()); + if (writtenCount == 0) { + qWarning("plugin list would be empty, this is almost certainly wrong. Not saving."); + } else { + if (file.commitIfDifferent(m_LastSaveHash[fileName])) { + qDebug("%s saved", QDir::toNativeSeparators(fileName).toUtf8().constData()); + } } } -- cgit v1.3.1