diff options
-rw-r--r-- | plugins/PluginUpdater/src/DlgListNew.cpp | 8 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 13 |
2 files changed, 10 insertions, 11 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp index f5c921b287..d5ecbb14e9 100644 --- a/plugins/PluginUpdater/src/DlgListNew.cpp +++ b/plugins/PluginUpdater/src/DlgListNew.cpp @@ -50,14 +50,11 @@ 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 tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
+ TCHAR 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;
@@ -351,6 +348,9 @@ 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++) {
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 048f480d1a..a558caa03c 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -57,11 +57,9 @@ static void ApplyUpdates(void *param) AutoHandle pipe(hPipe);
HWND hwndList = GetDlgItem(hDlg, IDC_LIST_UPDATES);
- TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
+ TCHAR 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);
// 2) Download all plugins
HANDLE nlc = NULL;
@@ -360,14 +358,11 @@ static void DlgUpdateSilent(void *lParam) }
AutoHandle pipe(hPipe);
- TCHAR tszFileTemp[MAX_PATH], tszFileBack[MAX_PATH];
+ TCHAR 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);
-
// 2) Download all plugins
HANDLE nlc = NULL;
// Count all updates that have been enabled
@@ -590,6 +585,10 @@ static int ScanFolder(const TCHAR *tszFolder, size_t cbBaseLen, int level, const Netlib_LogfT(hNetlibUser,_T("Scanning folder %s"), tszFolder);
+ TCHAR tszFileTemp[MAX_PATH];
+ mir_sntprintf(tszFileTemp, SIZEOF(tszFileTemp), _T("%s\\Temp"), tszRoot);
+ SafeCreateDirectory(tszFileTemp);
+
int count = 0;
do {
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|