summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/PluginUpdater.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-13 12:09:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-13 12:09:10 +0000
commitf708183c82bcbcb823218e2577d570446d5e63c1 (patch)
treea3a7cf763f73f571f344c380d5bb08dd2b828e6e /plugins/PluginUpdater/src/PluginUpdater.cpp
parent1c7ff6dc8addcecacfb60555d591435f110a85fb (diff)
fix for a conflict with the old Folders
git-svn-id: http://svn.miranda-ng.org/main/trunk@1441 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/PluginUpdater.cpp')
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 0ef0f64fc7..e481252b29 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -54,13 +54,15 @@ extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
- TCHAR* tszFolder = Utils_ReplaceVarsT(_T("%miranda_userdata%\\"DEFAULT_UPDATES_FOLDER));
- lstrcpyn(tszRoot, tszFolder, SIZEOF(tszRoot));
- if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
+ if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
hPluginUpdaterFolder = FoldersRegisterCustomPathT(MODULEA, "Plugin Updater", MIRANDA_USERDATAT _T("\\")DEFAULT_UPDATES_FOLDER);
+
+ if (hPluginUpdaterFolder)
FoldersGetCustomPathT(hPluginUpdaterFolder, tszRoot, MAX_PATH, _T(""));
+ else {
+ mir_ptr<TCHAR> tszFolder( Utils_ReplaceVarsT(_T("%miranda_userdata%\\"DEFAULT_UPDATES_FOLDER)));
+ lstrcpyn(tszRoot, tszFolder, SIZEOF(tszRoot));
}
- mir_free(tszFolder);
LoadOptions();
InitPopupList();