diff options
Diffstat (limited to 'plugins/PluginUpdater/src/DlgListNew.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/DlgListNew.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index d5ecbb14e9..59b534d97e 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -50,11 +50,15 @@ static void ApplyDownloads(void *param) AutoHandle pipe(hPipe);
HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
OBJLIST<FILEINFO> &todo = *(OBJLIST<FILEINFO> *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
- TCHAR tszFileBack[MAX_PATH];
+ //create needed folders after escalating priviledges. Folders creates when we actually install updates
+ TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
mir_sntprintf(tszFileBack, SIZEOF(tszFileBack), _T("%s\\Backups"), tszRoot);
SafeCreateDirectory(tszFileBack);
+ mir_sntprintf(tszFileTemp, SIZEOF(tszFileTemp), _T("%s\\Temp"), tszRoot);
+ SafeCreateDirectory(tszFileTemp);
+
VARST tszMirandaPath(_T("%miranda_path%"));
HANDLE nlc = NULL;
@@ -348,9 +352,6 @@ static void GetList(void *) }
FILELIST *UpdateFiles = new FILELIST(20);
- TCHAR tszFileTemp[MAX_PATH];
- mir_sntprintf(tszFileTemp, SIZEOF(tszFileTemp), _T("%s\\Temp"), tszRoot);
- SafeCreateDirectory(tszFileTemp);
VARST dirname(_T("%miranda_path%"));
for (int i=0; i < hashes.getCount(); i++) {
|