summaryrefslogtreecommitdiff
path: root/src/modules/database/database.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-08 18:28:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-08 18:28:51 +0000
commita075d35ca850f06170553d17ca464f0f5feadd97 (patch)
tree5a86b9dd53d495f6ab987fe72ad2d4f06a85caa2 /src/modules/database/database.cpp
parent5ba216d4b0d9a98ff6dfe0e4dd3117dcd417ce3a (diff)
separate Folders handles removed from protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@6405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database/database.cpp')
-rw-r--r--src/modules/database/database.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index 240daf3277..bdf8422569 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// contains the location of mirandaboot.ini
extern TCHAR mirandabootini[MAX_PATH];
bool g_bDbCreated;
-TCHAR g_profileDir[MAX_PATH], g_profileName[MAX_PATH];
+TCHAR g_profileDir[MAX_PATH], g_profileName[MAX_PATH], g_profileRoot[MAX_PATH];
TCHAR* g_defaultProfile;
void EnsureCheckerLoaded(bool);
@@ -51,6 +51,11 @@ static void fillProfileName(const TCHAR* ptszFileName)
p++;
_tcsncpy(g_profileName, p, SIZEOF(g_profileName));
+
+ TCHAR *szProfile = NEWTSTR_ALLOCA(p);
+ TCHAR *pExt = _tcsstr( _tcslwr(szProfile), _T(".dat"));
+ if (pExt) *pExt = 0;
+ mir_sntprintf(g_profileRoot, SIZEOF(g_profileRoot), _T("%s\\%s"), g_profileDir, szProfile);
}
bool IsInsideRootDir(TCHAR* profiledir, bool exact)