forked from liza/Questionable
Fix load error when trying to parse non-json file as quest
This commit is contained in:
parent
55d8daef93
commit
39e5a5a81d
@ -16,6 +16,8 @@ public static class AssemblyQuestLoader
|
|||||||
using ZipArchive zipArchive =
|
using ZipArchive zipArchive =
|
||||||
new ZipArchive(typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream(resourceName)!);
|
new ZipArchive(typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream(resourceName)!);
|
||||||
foreach (ZipArchiveEntry entry in zipArchive.Entries)
|
foreach (ZipArchiveEntry entry in zipArchive.Entries)
|
||||||
|
{
|
||||||
|
if (entry.Name.EndsWith(".json"))
|
||||||
{
|
{
|
||||||
using Stream stream = entry.Open();
|
using Stream stream = entry.Open();
|
||||||
loadFunction(entry.Name, stream);
|
loadFunction(entry.Name, stream);
|
||||||
@ -24,4 +26,5 @@ public static class AssemblyQuestLoader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
<Version>0.13</Version>
|
<Version>0.14</Version>
|
||||||
<LangVersion>12</LangVersion>
|
<LangVersion>12</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
Loading…
Reference in New Issue
Block a user