diff options
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;
}
|