diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-07-18 16:14:16 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-07-18 16:14:16 +0200 |
| commit | e80bb3a8370aeea37183d94f62e7bb3a843722b5 (patch) | |
| tree | 736ce43e0b554047031efdcc4ec2ec87d6545f2b /src | |
| parent | f6ecb93d460b16c10933b35605f7ac1d60eac705 (diff) | |
Check if there is actually something in overwrite to delete before asking confirmation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ModInfo::EFlag> 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;
}
|
