Subject: zip.ExtractAll work incorrect(extract not all files and dirs from archive) v 4.5.404.1253
Date: 2011-06-16 12:16:13
From: Alex Kovalev
Source: zip-extractall-work-incorrect-extract-not-files-dirs-archive-v-4-5-404-1253
----------------------------------------------------------------------
i have next code:
string unzipTempFolder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(unzipTempFolder);
string zipFile = Path.Combine(unzipTempFolder, newFileName);
file_upload.SaveAs(zipFile);
Zip zip = null;
try
{
zip = new Zip(zipFile);
zip.ExtractAll(unzipTempFolder);
}
catch (Exception ex)
{
Logger.LogExceptionRecursively(ex.Message, ex, MethodBase.GetCurrentMethod());
context.Response.Write(new CallbackResult{ErrorCode = 1, ErrorMessage = ex.Message}.ToJSON());
return;
}
finally
{
if (zip != null)
{
zip.Close();
zip.Dispose();
}
File.Delete(zipFile);
}
and archive with next structure(.zip):
alexk_01
-alexk_01a
-alexk_03a
-Alex_03a.doc
-Alex2a.bmp
-alexk_01b
-alexk_03b
Test_01.txt
when i try to extract this i have next
alexk_01
-alexk_01a
-alexk_03a
-Alex_03a.doc
-Alex2a.bmp
Test_01.txt
so i missed
-alexk_01b
-alexk_03b
----------------------------------------------------------------------
Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.
Back to ComponentPro Q&A Forum Index