corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [1/5] incubator-corinthia git commit: zipCreate
Date Mon, 03 Aug 2015 19:59:37 GMT
Repository: incubator-corinthia
Updated Branches:
  refs/heads/newZipExperiment2 b80df2922 -> f0ebf4c34


zipCreate


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/7f0e44fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/7f0e44fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/7f0e44fb

Branch: refs/heads/newZipExperiment2
Commit: 7f0e44fb9575683621afcba881bbcf52eb972d56
Parents: b80df29
Author: jani <jani@apache.org>
Authored: Sun Aug 2 11:29:09 2015 +0200
Committer: jani <jani@apache.org>
Committed: Sun Aug 2 11:29:09 2015 +0200

----------------------------------------------------------------------
 DocFormats/platform/src/Wrapper_zip.c | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/7f0e44fb/DocFormats/platform/src/Wrapper_zip.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/src/Wrapper_zip.c b/DocFormats/platform/src/Wrapper_zip.c
index 272d3be..2ff53fe 100644
--- a/DocFormats/platform/src/Wrapper_zip.c
+++ b/DocFormats/platform/src/Wrapper_zip.c
@@ -279,21 +279,12 @@ unsigned char *DFextZipReadFile(DFextZipHandleP zipHandle, DFextZipDirEntryP
zip
 DFextZipHandleP DFextZipCreate(const char *zipFilename) {
 	DFextZipHandleP zipHandle = xmalloc(sizeof(DFextZipHandle));
 
-#if 0
-	// no more memory
-	if (!zipHandle)
+	// Open file for write
+	if ((zipHandle->zipFile = fopen(zipFilename, "wb")) == NULL) {
+		free(zipHandle);
 		return NULL;
-
-	// Open file
-	zipHandle->zipFirst = 1;
-    zipHandle->handle = zipOpen(zipFilename, APPEND_STATUS_CREATE);
-
-	if (zipHandle->handle)
-		return zipHandle;
-
-	free(zipHandle);
-#endif
-	return NULL;
+	}
+	return zipHandle;
 }
 
 


Mime
View raw message