diff options
author | George Hazan <george.hazan@gmail.com> | 2014-04-09 12:56:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-04-09 12:56:57 +0000 |
commit | 2068cf47f49397ba35a5501c7949a1c3ce6342ff (patch) | |
tree | 146a5db8cf46761760c2f3d486f4cb0a2067e611 /src/mir_core | |
parent | 5d2487dc97a63b0545b2d7d56405e7417fa2dd75 (diff) |
fixes #647 (built-in langpack doesn't work in the presence of another langpacks)
git-svn-id: http://svn.miranda-ng.org/main/trunk@8902 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/langpack.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index 5f1e0709fe..b362dc34e3 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -373,11 +373,6 @@ MIR_CORE_DLL(int) LoadLangPack(const TCHAR *ptszLangPack) }
else _tcsncpy_s(tszFullPath, SIZEOF(tszFullPath), ptszLangPack, _TRUNCATE);
- // exists & not a directory?
- DWORD dwAttrib = GetFileAttributes(tszFullPath);
- if (dwAttrib == INVALID_FILE_ATTRIBUTES || (dwAttrib & FILE_ATTRIBUTE_DIRECTORY))
- return 3;
-
// this lang is already loaded? nothing to do then
if (!lstrcmp(tszFullPath, langPack.tszFullPath))
return 0;
@@ -386,6 +381,11 @@ MIR_CORE_DLL(int) LoadLangPack(const TCHAR *ptszLangPack) if (g_entryCount)
UnloadLangPackModule();
+ // exists & not a directory?
+ DWORD dwAttrib = GetFileAttributes(tszFullPath);
+ if (dwAttrib == INVALID_FILE_ATTRIBUTES || (dwAttrib & FILE_ATTRIBUTE_DIRECTORY))
+ return 3;
+
// copy the full file name and extract a file name from it
_tcsncpy_s(langPack.tszFullPath, SIZEOF(langPack.tszFullPath), tszFullPath, _TRUNCATE);
TCHAR *p = _tcsrchr(langPack.tszFullPath, '\\');
|