1
0
mirror of synced 2024-09-24 03:28:24 +02:00

fix: MIME based auto loading not working correctly

This commit is contained in:
WerWolv 2024-03-02 10:57:13 +01:00
parent f6c59b456f
commit f1b91ef360
2 changed files with 3 additions and 7 deletions

@ -1 +1 @@
Subproject commit 027ebfd1b2f8815eaf9de841da577d58c7f46d8f
Subproject commit f5d27c3c7dcadbd6dc02dcfcb52548b88210a91e

View File

@ -1392,12 +1392,8 @@ namespace hex::plugin::builtin {
if (!file.isValid())
continue;
auto &preprocessor = runtime.getInternals().preprocessor;
pl::api::Source source(file.readString());
auto ret = preprocessor->preprocess(&runtime, &source);
if (ret.hasErrs()) {
auto result = runtime.preprocessString(file.readString(), pl::api::Source::DefaultSource);
if (!result.has_value()) {
log::warn("Failed to preprocess file {} during MIME analysis", entry.path().string());
}