fix: MIME based auto loading not working correctly

This commit is contained in:
WerWolv
2024-03-02 10:57:13 +01:00
parent 0d08b36a73
commit 6cb0d4d7d8

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());
}