summaryrefslogtreecommitdiffstats
path: root/api/logic/FileSystem.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2019-08-05 00:44:56 +0200
committerPetr Mrázek <peterix@gmail.com>2019-08-05 00:46:59 +0200
commitc291946d2a8c3e03940da4070533e124283d303c (patch)
tree23155f22afed3812b187b915d2f28b8dc0c5e0f2 /api/logic/FileSystem.cpp
parentdfb30d91397f6b5ed80d94b7dde4e71346b1be35 (diff)
downloadMultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar
MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar.gz
MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar.lz
MultiMC-c291946d2a8c3e03940da4070533e124283d303c.tar.xz
MultiMC-c291946d2a8c3e03940da4070533e124283d303c.zip
NOISSUE do not lose selection on mod enable/disable toggle0.6.7
Diffstat (limited to 'api/logic/FileSystem.cpp')
-rw-r--r--api/logic/FileSystem.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/logic/FileSystem.cpp b/api/logic/FileSystem.cpp
index 192d868b..49af2927 100644
--- a/api/logic/FileSystem.cpp
+++ b/api/logic/FileSystem.cpp
@@ -174,6 +174,11 @@ bool copy::operator()(const QString &offset)
bool deletePath(QString path)
{
bool OK = true;
+ QFileInfo finfo(path);
+ if(finfo.isFile()) {
+ return QFile::remove(path);
+ }
+
QDir dir(path);
if (!dir.exists())