You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First of, thank you very much for your sharing this excellent library!
There is an unhandled exception in SharedUtilities.GetFileLength() when calling ZipFile.Save() and it contains a file that you dont have access to.
I dont know how you want it to work but maybe this exception should be caught, a ZipError event is triggered and the save operation continuous without the file?
Maybe the current way of determining file size was chosen for a reason but there is an alternate way: return new FileInfo(fileName).Length;
Best regards
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Ionic.Zip.SharedUtilities.GetFileLength(String fileName) in DotNetZip-master\Zip\Shared.cs:line 54
at Ionic.Zip.ZipEntry.MaybeUnsetCompressionMethodForWriting(Int32 cycle) in DotNetZip-master\Zip\ZipEntry.Write.cs:line 741
at Ionic.Zip.ZipEntry.WriteHeader(Stream s, Int32 cycle) in Zip\ZipEntry.Write.cs:line 1026
at Ionic.Zip.ZipEntry.Write(Stream s) in DotNetZip-master\Zip\ZipEntry.Write.cs:line 2214
at Ionic.Zip.ZipFile.Save() in DotNetZip-master\Zip\ZipFile.Save.cs:line 169
The text was updated successfully, but these errors were encountered:
athach
changed the title
ZipFeil.Save() unhandled exception
ZipFile.Save() unhandled exception
Nov 12, 2020
A little background information. I am using the library in a backup application. Some files scheduled for backup may locked by another application, in this case the backup should still be completed but without the files that cannot be accessed.
Hi,
First of, thank you very much for your sharing this excellent library!
There is an unhandled exception in SharedUtilities.GetFileLength() when calling ZipFile.Save() and it contains a file that you dont have access to.
I dont know how you want it to work but maybe this exception should be caught, a ZipError event is triggered and the save operation continuous without the file?
Maybe the current way of determining file size was chosen for a reason but there is an alternate way:
return new FileInfo(fileName).Length;
Best regards
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Ionic.Zip.SharedUtilities.GetFileLength(String fileName) in DotNetZip-master\Zip\Shared.cs:line 54
at Ionic.Zip.ZipEntry.MaybeUnsetCompressionMethodForWriting(Int32 cycle) in DotNetZip-master\Zip\ZipEntry.Write.cs:line 741
at Ionic.Zip.ZipEntry.WriteHeader(Stream s, Int32 cycle) in Zip\ZipEntry.Write.cs:line 1026
at Ionic.Zip.ZipEntry.Write(Stream s) in DotNetZip-master\Zip\ZipEntry.Write.cs:line 2214
at Ionic.Zip.ZipFile.Save() in DotNetZip-master\Zip\ZipFile.Save.cs:line 169
The text was updated successfully, but these errors were encountered: