[sword-svn] r3762 - trunk/src/modules/common

scribe at crosswire.org scribe at crosswire.org
Sat Jul 25 12:32:16 EDT 2020


Author: scribe
Date: 2020-07-25 12:32:16 -0400 (Sat, 25 Jul 2020)
New Revision: 3762

Modified:
   trunk/src/modules/common/zipcomprs.cpp
Log:
Updated new ZipCompress::unTarGZ for Windows

Modified: trunk/src/modules/common/zipcomprs.cpp
===================================================================
--- trunk/src/modules/common/zipcomprs.cpp	2020-07-25 15:56:48 UTC (rev 3761)
+++ trunk/src/modules/common/zipcomprs.cpp	2020-07-25 16:32:16 UTC (rev 3762)
@@ -28,8 +28,11 @@
 #include <swlog.h>
 #include <zipcomprs.h>
 #include <zlib.h>
+#include <utilstr.h>
 #ifndef WIN32
 #include <utime.h>
+#else
+#include <time.h>
 #endif
 extern "C" {
 #include "zlib.h"
@@ -163,7 +166,7 @@
 			unsigned int bytes = (remaining > BLOCKSIZE) ? BLOCKSIZE : remaining;
 
 			if (outfile != NULL) {
-				if (outfile->write(&buffer,sizeof(char)*bytes) != bytes) {
+				if (outfile->write(&buffer,sizeof(char)*bytes) != (int) bytes) {
 					sword::SWLog::getSystemLog()->logError("error writing %s skipping...", fname.c_str());
 					sword::FileMgr::getSystemFileMgr()->close(outfile);
 					sword::FileMgr::removeFile(fname);
@@ -185,7 +188,7 @@
  
 					localt = *localtime(&tartime);
 
-					hFile = CreateFileW((const wchar_t *)utf8ToWChar(fname).getRawData(), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+					hFile = CreateFileW((const wchar_t *)sword::utf8ToWChar(fname).getRawData(), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
 		  
 					st.wYear = (WORD)localt.tm_year+1900;
 					st.wMonth = (WORD)localt.tm_mon;



More information about the sword-cvs mailing list