gatherer: use absolute path in magic guess

This commit is contained in:
bvr-yr 2024-05-12 12:28:59 +03:00 committed by Mihai Fufezan
parent c87af3aa1f
commit 0477df2ca4
1 changed files with 1 additions and 1 deletions

View File

@ -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);