From 9df9815bfb61e567f3f63d166084deca5c614294 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Thu, 28 Dec 2017 17:46:01 -0800 Subject: [PATCH] Allow loading of zip streams via GetContentStream - Issue MatterHackers/MCCentral#2420 DragDrop zip onto bed suggests it works but does not --- Library/Providers/FileSystem/FileSystemFileItem.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Providers/FileSystem/FileSystemFileItem.cs b/Library/Providers/FileSystem/FileSystemFileItem.cs index 49b3b5653..dd489d853 100644 --- a/Library/Providers/FileSystem/FileSystemFileItem.cs +++ b/Library/Providers/FileSystem/FileSystemFileItem.cs @@ -58,8 +58,10 @@ namespace MatterHackers.MatterControl.Library public Task GetContentStream(Action 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()