# HG changeset patch # User unc0rr # Date 1315148676 -14400 # Node ID 0d6a338bf377f3e7f991bd8698c8fb8acfb708f5 # Parent e991f19132afae568d4a44e76ddf5c182599d932 Extract to cfgdir diff -r e991f19132af -r 0d6a338bf377 QTfrontend/pagedata.cpp --- 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)) {