ASPNETWebAPISamples | Random ASP.NET Web API Samples
kandi X-RAY | ASPNETWebAPISamples Summary
kandi X-RAY | ASPNETWebAPISamples Summary
Random ASP.NET Web API Samples
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ASPNETWebAPISamples
ASPNETWebAPISamples Key Features
ASPNETWebAPISamples Examples and Code Snippets
Community Discussions
Trending Discussions on ASPNETWebAPISamples
QUESTION
Hello I am trying to extract a zip like Unpack a zip using ZipInputStream (eg for Unseekable input streams). With the help of SharpZipLib. But this always give me an error:
Error:
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll Error: Could not find a part of the path 'C:\Users\username\Documents\Visual Studio 2015\Projects\WpfApplication1\WpfApplication1\bin\Debug\ASPNETWebAPISamples-master\'.
I have even tried **ZipFile.ExtractToDirectory**
build in extractor and http://dotnetzip.codeplex.com/ . they both also gave Path too Long exception .
I have found several question regarding path too long exception. But none had worked for me.
How to resolve this error? Thanks.
...ANSWER
Answered 2017-Mar-15 at 12:07The problem is that zipInputStream.GetNextEntry()
returns both directories and files within the zip file. This isn't a problem in itself but your code only handles files. To fix this you need to detect if the fullZipToPath
variable holds a path to a file or a directory.
The way to do that is by inspecting the ZipEntry.IsDirectory
property. Change your code to:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ASPNETWebAPISamples
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page