QTfrontend/pagedata.cpp
changeset 5762 0d6a338bf377
parent 5756 b451fd21ff4c
child 5764 d785d7e23113
--- a/QTfrontend/pagedata.cpp	Sun Sep 04 10:54:00 2011 -0400
+++ b/QTfrontend/pagedata.cpp	Sun Sep 04 19:04:36 2011 +0400
@@ -29,6 +29,7 @@
 
 #include "pagedata.h"
 #include "databrowser.h"
+#include "hwconsts.h"
 
 #include "quazip.h"
 #include "quazipfile.h"
@@ -141,6 +142,9 @@
 
     QuaZipFile file(&zip);
 
+    QDir extractDir(*cfgdir);
+    extractDir.cd("Data");
+
     for(bool more = zip.goToFirstFile(); more; more = zip.goToNextFile())
     {
         if(!file.open(QIODevice::ReadOnly))
@@ -151,14 +155,14 @@
 
 
         QString fileName = file.getActualFileName();
-        QString filePath = QDir::tempPath() + "/" + fileName;
+        QString filePath = extractDir.filePath(fileName);
         if (fileName.endsWith("/"))
         {
             QFileInfo fi(filePath);
             QDir().mkpath(fi.filePath());
         } else
         {
-            qDebug() << filePath;
+            qDebug() << "Extracting" << filePath;
             QFile out(filePath);
             if(!out.open(QFile::WriteOnly))
             {