VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/SelfExtract.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Setup/SelfExtract.c')
-rw-r--r--src/Setup/SelfExtract.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c
index a4acde26..3ebaf5e6 100644
--- a/src/Setup/SelfExtract.c
+++ b/src/Setup/SelfExtract.c
@@ -19,8 +19,12 @@
#include "Language.h"
#include "Resource.h"
#include <Strsafe.h>
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
#define OutputPackageFile "VeraCrypt Setup " VERSION_STRING ".exe"
#define MAG_START_MARKER "TCINSTRT"
#define MAG_END_MARKER_OBFUSCATED "T/C/I/N/S/C/R/C"
@@ -251,9 +255,9 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, char *szDestDir)
// Clone 'VeraCrypt Setup.exe' to create the base of the new self-extracting archive
if (!TCCopyFile (inputFile, outputFile))
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
PkgError ("Cannot copy 'VeraCrypt Setup.exe' to the package");
goto err;
}
@@ -434,9 +438,9 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, char *szDestDir)
tmpBuffer = LoadFile (outputFile, &tmpFileSize);
if (tmpBuffer == NULL)
{
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
if (remove (outputFile))
PkgError ("Cannot load the package to compute CRC.\nFailed also to delete package file");
else
PkgError ("Cannot load the package to compute CRC");
@@ -719,9 +723,9 @@ void __cdecl ExtractAllFilesThread (void *hwndDlg)
if (mkfulldir (DestExtractPath, FALSE) != 0)
{
wchar_t szTmp[TC_MAX_PATH];
- handleWin32Error (hwndDlg);
+ handleWin32Error (hwndDlg, SRC_POS);
StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("CANT_CREATE_FOLDER"), DestExtractPath);
MessageBoxW (hwndDlg, szTmp, lpszTitle, MB_ICONHAND);
bSuccess = FALSE;
goto eaf_end;