diff --git a/far/changelog b/far/changelog index 16ad94bb20..ac03e441fc 100644 --- a/far/changelog +++ b/far/changelog @@ -1,3 +1,7 @@ +drkns 25.09.2017 20:22:04 +0100 - build 5044 + +1. Уточнение 5038. + drkns 25.09.2017 19:57:02 +0100 - build 5043 1. Уточнение 5041. diff --git a/far/execute.cpp b/far/execute.cpp index b22e7f4592..36170d225a 100644 --- a/far/execute.cpp +++ b/far/execute.cpp @@ -180,7 +180,7 @@ static bool FindObject(const string& Module, string &strDest, bool &Internal) return false; const auto ModuleExt = PointToExt(Module); - const auto strPathExt = os::env::get_pathext(); + const auto strPathExt = lower(os::env::get_pathext()); const auto PathExtList = enum_tokens(strPathExt, L";"); const auto& TryWithExtOrPathExt = [&](const string& Name, const auto& Predicate) @@ -284,6 +284,21 @@ static bool FindObject(const string& Module, string &strDest, bool &Internal) } } + { + // Use SearchPath: + const auto Result = TryWithExtOrPathExt(Module, [](const string& NameWithExt) + { + string Result; + return std::make_pair(os::SearchPath(nullptr, NameWithExt, nullptr, Result), Result); + }); + + if (Result.first) + { + strDest = Result.second; + return true; + } + } + { // Look in the App Paths registry keys: if (Global->Opt->Exec.ExecuteUseAppPath && !contains(Module, L'\\')) diff --git a/far/vbuild.m4 b/far/vbuild.m4 index f62cf446ec..64775227cf 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -m4_define(BUILD,5043)m4_dnl +m4_define(BUILD,5044)m4_dnl