From 8c2e88b9c90721557cef815696d5d0bf287420a0 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 12 Apr 2015 15:43:46 +0200 Subject: MO will no longer use the load order from an empty loadorder.txt because the file should at least have a header. --- src/pluginlist.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pluginlist.cpp') 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; -- cgit v1.3.1