summaryrefslogtreecommitdiffstats
path: root/helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'helper.cpp')
-rw-r--r--helper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/helper.cpp b/helper.cpp
index 7b49695..9be7066 100644
--- a/helper.cpp
+++ b/helper.cpp
@@ -13,6 +13,7 @@
#include <QCryptographicHash>
#include <QHash>
#include <QSettings>
+#include <QDir>
#include "helper.h"
@@ -90,6 +91,10 @@ namespace Helper {
return QString();
}
}
+ QFileInfo destDir = QFileInfo(destFile.absolutePath());
+ if(!destDir.exists()){
+ QDir::root().mkpath(destFile.absolutePath());
+ }
bool success = QFile::rename(path, destFile.absoluteFilePath());
if(success){
return destFile.absoluteFilePath();