From 0477df2ca484f3053a76430606bad95edf824929 Mon Sep 17 00:00:00 2001 From: bvr-yr Date: Sun, 12 May 2024 12:28:59 +0300 Subject: [PATCH] gatherer: use absolute path in magic guess --- 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 2aa5c99..70f9ec8 100644 --- a/src/renderer/AsyncResourceGatherer.cpp +++ b/src/renderer/AsyncResourceGatherer.cpp @@ -163,7 +163,7 @@ void CAsyncResourceGatherer::gather() { auto handle = magic_open(MAGIC_NONE | MAGIC_COMPRESS); magic_load(handle, nullptr); - const auto type_str = std::string(magic_file(handle, path.c_str())); + const auto type_str = std::string(magic_file(handle, ABSOLUTEPATH.c_str())); const auto first_word = type_str.substr(0, type_str.find(" ")); magic_close(handle);