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
I am confused at behavior i see when saving files. Lets say I want to create a zip of just picture files.
Example
Folder: C:\Temp
Pictures: C:\Temp\pic1.jpg
C:\Temp\pic2.jpg
C:\Temp\pic3.jpg
Now code:
var fileNames = Directory
.GetFiles(@"C:\Temp\");
using (var zipFile = new ZipFile())
{
zipFile.AddFiles(fileNames);
zipFile.Save(streamToReturn);
}
This works and produces zip but when I open archive it starts with TEMP folder even though I don't want folder. I just want zip file with three pictures. I have tried saving to file, stream then to file etc and cannot seem to get that behavior. Any ideas?
The text was updated successfully, but these errors were encountered:
I am confused at behavior i see when saving files. Lets say I want to create a zip of just picture files.
Example
Folder: C:\Temp
Pictures: C:\Temp\pic1.jpg
C:\Temp\pic2.jpg
C:\Temp\pic3.jpg
Now code:
This works and produces zip but when I open archive it starts with TEMP folder even though I don't want folder. I just want zip file with three pictures. I have tried saving to file, stream then to file etc and cannot seem to get that behavior. Any ideas?
The text was updated successfully, but these errors were encountered: