I use this function "CreateZip(string zipFileName, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter)" to create the zip in a network folder.
Sometimes I receive the error "Exception: System.IO.FileNotFoundException: Unable to find the specified file." I guess that some problem occurs when do "File.Create(zipFileName)". Maybe the impact come from the connection with network folder.
Reproduction Code
No response
Steps to reproduce
It's very hard to reproduce,
But I think we can do a cheat to reproduce.
when the zip file was created by File.Create(zipFileName), delete this file and continue
Expected behavior
My idea is have a check to ensure that the zipfile must be created before send to the next function or throw a correct log.
Describe the bug
I use this function "CreateZip(string zipFileName, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter)" to create the zip in a network folder. Sometimes I receive the error "Exception: System.IO.FileNotFoundException: Unable to find the specified file." I guess that some problem occurs when do "File.Create(zipFileName)". Maybe the impact come from the connection with network folder.
Reproduction Code
No response
Steps to reproduce
It's very hard to reproduce, But I think we can do a cheat to reproduce. when the zip file was created by File.Create(zipFileName), delete this file and continue
Expected behavior
My idea is have a check to ensure that the zipfile must be created before send to the next function or throw a correct log.
Operating System
Windows
Framework Version
.NET Framework 4.x
Tags
ZIP
Additional context
I use version 1.4.2