VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Setup.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-04 16:42:03 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-04 23:41:44 (GMT)
commit1ad425e4e19bfef683dfeab7547a0781ec150e44 (patch)
treecaff928ed7057d013159da5fe104101068760026 /src/Setup/Setup.c
parentb8786598103d6cf8ffcfde133f3e8651bb7ddc99 (diff)
downloadVeraCrypt-1ad425e4e19bfef683dfeab7547a0781ec150e44.zip
VeraCrypt-1ad425e4e19bfef683dfeab7547a0781ec150e44.tar.gz
Windows: Install CHM User Guide instead of PDF one. Delete existing PDF when upgrading.
Diffstat (limited to 'src/Setup/Setup.c')
-rw-r--r--src/Setup/Setup.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index bb7eef0..b08ded6 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -1016,6 +1016,29 @@ err:
}
}
+ // remove PDF from previous version if any
+ if (bUninstall == FALSE)
+ {
+ WIN32_FIND_DATA f;
+ HANDLE h;
+
+ SetCurrentDirectory (szDestDir);
+ h = FindFirstFile (L"VeraCrypt User Guide*.pdf", &f);
+
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ StatDeleteFile (f.cFileName, TRUE);
+ }
+ while (FindNextFile(h, &f) != 0);
+
+ FindClose (h);
+ }
+
+ SetCurrentDirectory (SetupFilesDir);
+ }
+
// Language pack
if (bUninstall == FALSE)
{
@@ -1036,7 +1059,7 @@ err:
SetCurrentDirectory (SetupFilesDir);
SetCurrentDirectory (L"Setup files");
- h = FindFirstFile (L"VeraCrypt User Guide.*.pdf", &f);
+ h = FindFirstFile (L"VeraCrypt User Guide.*.chm", &f);
if (h != INVALID_HANDLE_VALUE)
{
wchar_t d[MAX_PATH*2];