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:
parent
cfaa97dd30
commit
9df9815bfb
1 changed files with 4 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue