diff options
| author | Tannin <devnull@localhost> | 2015-03-31 18:31:21 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-03-31 18:31:21 +0200 |
| commit | 35eb41daf94ece8843bda1a0ba68cd92d031eed6 (patch) | |
| tree | 104072d23fd467a0d6f94e418cfb402b239f44ed /src | |
| parent | 38eb03c306bc1317ac09195656ea10e413157c4e (diff) | |
will now avoid writing plugin lists if they would be empty (as its probably a bug)
Diffstat (limited to 'src')
| -rw-r--r-- | src/pluginlist.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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());
+ }
}
}
|
