Make sure we can handle trying to check a bad zip file for centering.
This commit is contained in:
parent
e345dd3bd9
commit
f9fed74e36
1 changed files with 7 additions and 7 deletions
|
|
@ -678,11 +678,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
if (File.Exists(printItemWrapper.FileLocation))
|
||||
{
|
||||
using (Stream uncompressedFileStream = File.OpenRead(printItemWrapper.FileLocation))
|
||||
try
|
||||
{
|
||||
using (Stream fileStream = AmfProcessing.GetCompressedStreamIfRequired(uncompressedFileStream))
|
||||
using (Stream uncompressedFileStream = File.OpenRead(printItemWrapper.FileLocation))
|
||||
{
|
||||
try
|
||||
using (Stream fileStream = AmfProcessing.GetCompressedStreamIfRequired(uncompressedFileStream))
|
||||
{
|
||||
// read up the first 32k and make sure it says the file was created my MatterControl
|
||||
int bufferSize = 32000;
|
||||
|
|
@ -694,12 +694,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
return false;
|
||||
}
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue