From ee14a418c007c74554aa52e86282217e23580560 Mon Sep 17 00:00:00 2001 From: morkt Date: Wed, 16 Sep 2015 23:54:35 +0400 Subject: [PATCH] (FileSystemStack.ChDir): propagate OperationCanceledException. --- GameRes/FileSystem.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/GameRes/FileSystem.cs b/GameRes/FileSystem.cs index 7aaccdf3..3f5ee865 100644 --- a/GameRes/FileSystem.cs +++ b/GameRes/FileSystem.cs @@ -477,7 +477,12 @@ namespace GameRes Flush(); var arc = ArcFile.TryOpen (entry.Name); if (null == arc) - throw new UnknownFormatException(); + { + if (FormatCatalog.Instance.LastError is OperationCanceledException) + throw FormatCatalog.Instance.LastError; + else + throw new UnknownFormatException(); + } try { Push (entry.Name, arc.CreateFileSystem());