Fix load error when trying to parse non-json file as quest v0.14
authorLiza Carvelli <liza@carvel.li>
Fri, 14 Jun 2024 05:49:30 +0000 (07:49 +0200)
committerLiza Carvelli <liza@carvel.li>
Fri, 14 Jun 2024 05:49:30 +0000 (07:49 +0200)
QuestPaths/AssemblyQuestLoader.cs
Questionable/Questionable.csproj

index 460e1971485370c074d208129f64408427034cd4..95faeb46bf84989b7f638a5a244bb7c219a3f1a0 100644 (file)
@@ -17,8 +17,11 @@ public static class AssemblyQuestLoader
                     new ZipArchive(typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream(resourceName)!);
                 foreach (ZipArchiveEntry entry in zipArchive.Entries)
                 {
-                    using Stream stream = entry.Open();
-                    loadFunction(entry.Name, stream);
+                    if (entry.Name.EndsWith(".json"))
+                    {
+                        using Stream stream = entry.Open();
+                        loadFunction(entry.Name, stream);
+                    }
                 }
             }
         }
index d9484247670ba7132a1bf18e1a1b38a04ad32e87..2e9031b456d0300154343b69f979b3101dea669d 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
         <TargetFramework>net8.0-windows</TargetFramework>
-        <Version>0.13</Version>
+        <Version>0.14</Version>
         <LangVersion>12</LangVersion>
         <Nullable>enable</Nullable>
         <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>