From cc71c0b7d9aae799420f3a919d00efe1e0a32c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darko=20Nikoli=C4=87?= <144422643+dqrk0jeste@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:37:47 +0200 Subject: [PATCH] core: fix symlinked images not picking up extension (#473) --- src/renderer/AsyncResourceGatherer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/AsyncResourceGatherer.cpp b/src/renderer/AsyncResourceGatherer.cpp index 17627ed..7cc6bba 100644 --- a/src/renderer/AsyncResourceGatherer.cpp +++ b/src/renderer/AsyncResourceGatherer.cpp @@ -106,7 +106,7 @@ FileType getFileType(const std::filesystem::path& path) { ft = FileType::WEBP; else { // magic is slow, so only use it when no recognized extension is found - auto handle = magic_open(MAGIC_NONE | MAGIC_COMPRESS); + auto handle = magic_open(MAGIC_NONE | MAGIC_COMPRESS | MAGIC_SYMLINK); magic_load(handle, nullptr); const auto type_str = std::string(magic_file(handle, path.c_str()));