summaryrefslogtreecommitdiff
path: root/src/pluginlist.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-04-12 15:43:46 +0200
committerTannin <devnull@localhost>2015-04-12 15:43:46 +0200
commit8c2e88b9c90721557cef815696d5d0bf287420a0 (patch)
treeb939ff1b5a93cf0e94ff0466092d79dc351e9676 /src/pluginlist.cpp
parentef39699d699d30015083d897c392068fb4ae232d (diff)
MO will no longer use the load order from an empty loadorder.txt because the
file should at least have a header.
Diffstat (limited to 'src/pluginlist.cpp')
-rw-r--r--src/pluginlist.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 927a4c7e..f1a58cfb 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -324,6 +324,10 @@ bool PluginList::readLoadOrder(const QString &fileName)
if (!file.open(QIODevice::ReadOnly)) {
return false;
}
+ if (file.size() == 0) {
+ // MO stores at least a header in the file. if it's completely empty the file is broken
+ return false;
+ }
while (!file.atEnd()) {
QByteArray line = file.readLine().trimmed();
QString modName;