From 928802b67d65d57521f654a52ad755fadcd2648e Mon Sep 17 00:00:00 2001
From: Akira Ohgaki <akiraohgaki@gmail.com>
Date: Wed, 19 Jul 2017 08:24:23 +0900
Subject: [PATCH] Fix for installation process

---
 app/src/handlers/itemhandler.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/src/handlers/itemhandler.cpp b/app/src/handlers/itemhandler.cpp
index 6255c39..44e185f 100644
--- a/app/src/handlers/itemhandler.cpp
+++ b/app/src/handlers/itemhandler.cpp
@@ -314,8 +314,10 @@ void ItemHandler::installDownloadedFile(qtlib::NetworkResource *resource)
     auto filename = metadata["filename"].toString();
     auto installType = metadata["install_type"].toString();
 
-    auto tempDirPrefix = configHandler_->getAppConfigApplication()["id"].toString() + "_" + filename;
-    qtlib::Dir tempDir(qtlib::Dir::tempPath() + "/" + tempDirPrefix);
+    QString tempDirPrefix = "temp_" + filename;
+    qtlib::Dir tempDir(qtlib::Dir::genericCachePath() + "/"
+                       + configHandler_->getAppConfigApplication()["id"].toString() + "/"
+                       + tempDirPrefix);
     tempDir.make();
     qtlib::Dir tempDestDir(tempDir.path() + "/dest");
     tempDestDir.make();
-- 
GitLab