From e80bb3a8370aeea37183d94f62e7bb3a843722b5 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Wed, 18 Jul 2018 16:14:16 +0200 Subject: Check if there is actually something in overwrite to delete before asking confirmation. --- src/modlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/modlist.cpp b/src/modlist.cpp index 87cbbfb2..27bccf63 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -1002,7 +1002,7 @@ bool ModList::removeRows(int row, int count, const QModelIndex &parent) if (count == 1) { ModInfo::Ptr modInfo = ModInfo::getByIndex(row); std::vector flags = modInfo->getFlags(); - if (std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end()) { + if ((std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end()) && (QDir(modInfo->absolutePath()).count() > 2)) { emit clearOverwrite(); success = true; } -- cgit v1.3.1