VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 01:38:22 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 01:41:48 +0200
commiteb72fe7aa9aa4be3de58c8dd04b15a42c7634448 (patch)
treef518986e982290c43e3a3bc7f5c5662b10f1766a /src/Setup/Setup.c
parent0ef137c0a4005eca6de49e754cab136e052a6496 (diff)
downloadVeraCrypt-eb72fe7aa9aa4be3de58c8dd04b15a42c7634448.tar.gz
VeraCrypt-eb72fe7aa9aa4be3de58c8dd04b15a42c7634448.zip
Windows: move language XML files to new "Languages" folder in the installation directory.
Diffstat (limited to 'src/Setup/Setup.c')
-rw-r--r--src/Setup/Setup.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index b08ded64..367aaf90 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -1015,14 +1015,15 @@ err:
return FALSE;
}
}
-
- // remove PDF from previous version if any
+
if (bUninstall == FALSE)
{
WIN32_FIND_DATA f;
HANDLE h;
SetCurrentDirectory (szDestDir);
+
+ // remove PDF from previous version if any
h = FindFirstFile (L"VeraCrypt User Guide*.pdf", &f);
if (h != INVALID_HANDLE_VALUE)
@@ -1036,38 +1037,20 @@ err:
FindClose (h);
}
- SetCurrentDirectory (SetupFilesDir);
- }
-
- // Language pack
- if (bUninstall == FALSE)
- {
- WIN32_FIND_DATA f;
- HANDLE h;
-
- SetCurrentDirectory (SetupFilesDir);
- h = FindFirstFile (L"Language.*.xml", &f);
+ // remove language XML files from previous version if any
+ h = FindFirstFile (L"Language*.xml", &f);
if (h != INVALID_HANDLE_VALUE)
{
- wchar_t d[MAX_PATH*2];
- StringCbPrintfW (d, sizeof(d), L"%s%s", szDestDir, f.cFileName);
- CopyMessage (hwndDlg, d);
- TCCopyFile (f.cFileName, d);
- FindClose (h);
- }
+ do
+ {
+ StatDeleteFile (f.cFileName, TRUE);
+ }
+ while (FindNextFile(h, &f) != 0);
- SetCurrentDirectory (SetupFilesDir);
- SetCurrentDirectory (L"Setup files");
- h = FindFirstFile (L"VeraCrypt User Guide.*.chm", &f);
- if (h != INVALID_HANDLE_VALUE)
- {
- wchar_t d[MAX_PATH*2];
- StringCbPrintfW (d, sizeof(d), L"%s%s", szDestDir, f.cFileName);
- CopyMessage (hwndDlg, d);
- TCCopyFile (f.cFileName, d);
FindClose (h);
}
+
SetCurrentDirectory (SetupFilesDir);
}