diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-26 20:27:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-26 20:27:43 +0000 |
commit | 3d8bfe9fd7aa830a2567199c95ded6286c9eec22 (patch) | |
tree | ce3f3d13bed36da7f6a9f01468d8e0d8997f1c1b /plugins | |
parent | 6fbcb9cc3bd496ef8ee2df20ba1b95f756456d23 (diff) |
fix for registering Folders in CrashDumper
git-svn-id: http://svn.miranda-ng.org/main/trunk@10602 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CrashDumper/src/crshdmp.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 5dc776fa2f..dfbd7d3557 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -212,23 +212,21 @@ static int ModulesLoaded(WPARAM, LPARAM) CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)SIZEOF(temp), (LPARAM)temp);
crs_a2t(vertxt, temp);
- profname = Utils_ReplaceVarsT(_T("%miranda_profilename%.dat"));
- if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
- profpath = mir_tstrdup(_T("%miranda_userdata%"));
- else
- profpath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+ if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
+ replaceStrT(profpath, _T("%miranda_userdata%"));
+
+ hCrashLogFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Crash Reports"), CrashLogFolder);
+ hVerInfoFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Version Information"), VersionInfoFolder);
+
+ HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersPathChanged);
+ FoldersPathChanged(0, 0);
+ }
mir_sntprintf(CrashLogFolder, MAX_PATH, TEXT("%s\\CrashLog"), profpath);
mir_sntprintf(VersionInfoFolder, MAX_PATH, TEXT("%s"), profpath);
SetExceptionHandler();
- hCrashLogFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Crash Reports"), CrashLogFolder);
- hVerInfoFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Version Information"), VersionInfoFolder);
-
- FoldersPathChanged(0, 0);
-
- HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersPathChanged);
HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded);
UploadInit();
@@ -331,6 +329,9 @@ extern "C" int __declspec(dllexport) Load(void) dtsubfldr = db_get_b(NULL, PluginName, "SubFolders", 1) != 0;
mir_getLP(&pluginInfoEx);
+ profname = Utils_ReplaceVarsT(_T("%miranda_profilename%.dat"));
+ profpath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_OPT_INITIALISE, OptionsInit);
HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded);
|