Save to compressed mcx is working

Don't call save twice
This commit is contained in:
Lars Brubaker 2022-02-02 10:52:42 -08:00
parent c351af843b
commit a2aaaf6715
9 changed files with 109 additions and 56 deletions

View file

@ -2167,11 +2167,13 @@ namespace MatterHackers.MatterControl
if (settingsFilePath != null)
{
using (var file = File.OpenWrite(archivePath))
using (var zip = new ZipArchive(file, ZipArchiveMode.Create))
{
zip.CreateEntryFromFile(sourcePath, "PrinterPlate.mcx");
zip.CreateEntryFromFile(settingsFilePath, printer.PrinterName + ".printer");
zip.CreateEntryFromFile(gcodeFilePath, "sliced.gcode");
using (var zip = new ZipArchive(file, ZipArchiveMode.Create))
{
zip.CreateEntryFromFile(sourcePath, "PrinterPlate.mcx");
zip.CreateEntryFromFile(settingsFilePath, printer.PrinterName + ".printer");
zip.CreateEntryFromFile(gcodeFilePath, "sliced.gcode");
}
}
}
}