Skip to content

Commit

Permalink
1. Уточнение 4275.
Browse files Browse the repository at this point in the history
2. Продолжение 4276.
  • Loading branch information
alabuzhev committed Feb 23, 2015
1 parent 462647f commit d1658e2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
8 changes: 7 additions & 1 deletion far/changelog
@@ -1,4 +1,10 @@
drkns 21.02.2015 11:14:06 +0200 - build 4276
drkns 23.02.2015 19:43:02 +0200 - build 4277

1. Уточнение 4275.

2. Продолжение 4276.

drkns 21.02.2015 11:14:06 +0200 - build 4276

1. Некорректно работало разворачивание путей вида C:path.

Expand Down
4 changes: 2 additions & 2 deletions far/codepage.cpp
Expand Up @@ -1413,7 +1413,7 @@ F8CP::F8CP(bool viewer):
UINT defcp = viewer ? Global->Opt->ViOpt.DefaultCodePage : Global->Opt->EdOpt.DefaultCodePage;

string cps(viewer ? Global->Opt->ViOpt.strF8CPs : Global->Opt->EdOpt.strF8CPs);
if (!cps.empty())
if (cps != L"-1")
{
std::unordered_set<UINT> used_cps;
std::vector<string> f8list;
Expand Down Expand Up @@ -1445,7 +1445,7 @@ F8CP::F8CP(bool viewer):
if (m_F8CpOrder.empty())
{
UINT acp = GetACP(), oemcp = GetOEMCP();
if (!cps.empty())
if (cps != L"-1")
defcp = acp;
m_F8CpOrder.push_back(defcp);
if (acp != defcp)
Expand Down
3 changes: 2 additions & 1 deletion far/farwinapi.cpp
Expand Up @@ -1996,8 +1996,9 @@ DWORD GetAppPathsRedirectionFlag()

HMODULE module::get_module() const
{
if (!m_module)
if (!m_tried && !m_module)
{
m_tried = true;
m_module = GetModuleHandle(m_name);
if (!m_module)
{
Expand Down
2 changes: 2 additions & 0 deletions far/farwinapi.hpp
Expand Up @@ -405,6 +405,7 @@ namespace api
m_name(name),
m_module(),
m_loaded(),
m_tried(),
m_AlternativeLoad(AlternativeLoad)
{}
~module();
Expand All @@ -418,6 +419,7 @@ namespace api
const wchar_t* m_name;
mutable HMODULE m_module;
mutable bool m_loaded;
mutable bool m_tried;
const bool m_AlternativeLoad;
};

Expand Down
3 changes: 1 addition & 2 deletions far/pathmix.cpp
Expand Up @@ -515,8 +515,7 @@ string ExtractFileName(const string &Path)

size_t PathRootLen = GetPathRootLength(Path);

if (p < PathRootLen && PathRootLen)
return string();
p = std::max(p, PathRootLen);

return string(Path.data() + p, Path.size() - p);
}
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4276)m4_dnl
m4_define(BUILD,4277)m4_dnl

0 comments on commit d1658e2

Please sign in to comment.