Download .zip too, and store them to .hwp
authorunc0rr
Sun, 18 Nov 2012 18:52:58 +0400
changeset 8059 07661fb20586
parent 8058 bcebfc477459
child 8060 341fa76d0749
Download .zip too, and store them to .hwp
QTfrontend/ui/page/pagedata.cpp
--- a/QTfrontend/ui/page/pagedata.cpp	Sat Nov 17 20:30:32 2012 -0500
+++ b/QTfrontend/ui/page/pagedata.cpp	Sun Nov 18 18:52:58 2012 +0400
@@ -72,7 +72,7 @@
     else
         finalUrl = url;
 
-    if(url.path().endsWith(".hwp"))
+    if(url.path().endsWith(".hwp") || url.path().endsWith(".zip"))
     {
         qWarning() << "Download Request" << url.toString();
         QString fileName = QFileInfo(url.toString()).fileName();
@@ -138,6 +138,8 @@
         extractDir.cd("Data");
 
         QString fileName = extractDir.filePath(QFileInfo(reply->url().path()).fileName());
+        if(fileName.endsWith(".zip"))
+            fileName = fileName.left(fileName.length() - 4) + ".hwp";
 
         QFile out(fileName);
         if(!out.open(QFile::WriteOnly))