Allow loading of zip streams via GetContentStream

- Issue MatterHackers/MCCentral#2420
DragDrop zip onto bed suggests it works but does not
This commit is contained in:
John Lewin 2017-12-28 17:46:01 -08:00
parent cfaa97dd30
commit 9df9815bfb

View file

@ -58,8 +58,10 @@ namespace MatterHackers.MatterControl.Library
public Task<StreamAndLength> GetContentStream(Action<double, string> reportProgress)
{
if (ApplicationController.Instance.IsLoadableFile(this.Path)
&& File.Exists(this.Path))
if (File.Exists(this.Path)
&& (ApplicationController.Instance.IsLoadableFile(this.Path)
|| (System.IO.Path.GetExtension(this.Path) is string extension
&& string.Equals(extension, ".zip", StringComparison.OrdinalIgnoreCase))))
{
var stream = File.OpenRead(this.Path);
return Task.FromResult(new StreamAndLength()