Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Behavior #8

Open
JohnFredMeyer opened this issue Jun 5, 2020 · 0 comments
Open

Unexpected Behavior #8

JohnFredMeyer opened this issue Jun 5, 2020 · 0 comments

Comments

@JohnFredMeyer
Copy link

JohnFredMeyer commented Jun 5, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant