diff options
author | George Hazan <george.hazan@gmail.com> | 2012-08-08 13:58:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-08-08 13:58:34 +0000 |
commit | 7098878c15e41955369620fe2844a133aef4b4ef (patch) | |
tree | 7ad1532663e5905971b94c70367025205c31e1ab /plugins/PluginUpdater/src/unzipfile.cpp | |
parent | 6bd1e383879d3c7f6528088bb6fb721c44d64b79 (diff) |
remove successfully unpacked zip files
git-svn-id: http://svn.miranda-ng.org/main/trunk@1402 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/unzipfile.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/unzipfile.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/PluginUpdater/src/unzipfile.cpp b/plugins/PluginUpdater/src/unzipfile.cpp index dc55dfca43..6d3057d12d 100644 --- a/plugins/PluginUpdater/src/unzipfile.cpp +++ b/plugins/PluginUpdater/src/unzipfile.cpp @@ -91,17 +91,22 @@ bool extractCurrentFile(unzFile uf, TCHAR* ptszDestPath, TCHAR* ptszBackPath) return true;
}
-void unzip(const TCHAR* ptszZipFile, TCHAR* ptszDestPath, TCHAR* ptszBackPath)
+bool unzip(const TCHAR* ptszZipFile, TCHAR* ptszDestPath, TCHAR* ptszBackPath)
{
+ bool bResult = true;
+
zlib_filefunc64_def ffunc;
fill_fopen64_filefunc(&ffunc);
-
+
unzFile uf = unzOpen2_64(ptszZipFile, &ffunc);
if (uf) {
do {
- extractCurrentFile(uf, ptszDestPath, ptszBackPath);
+ if ( !extractCurrentFile(uf, ptszDestPath, ptszBackPath))
+ bResult = false;
}
while (unzGoToNextFile(uf) == UNZ_OK);
unzClose(uf);
}
+
+ return bResult;
}
|