From 0f264e9f5ae5f6623e7a233e5f20bf67f670cc77 Mon Sep 17 00:00:00 2001 From: anders_k Date: Thu, 7 Aug 2014 12:31:51 +0000 Subject: [PATCH] Warn if !packhdr system() call returns non-zero git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6536 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/build.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/build.cpp b/Source/build.cpp index 59c0da4e..7cc16780 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -2528,12 +2528,15 @@ int CEXEBuild::pack_exe_header() } fwrite(m_exehead,1,m_exehead_size,tmpfile); fclose(tmpfile); - if (sane_system(build_packcmd) == -1) + int ec = sane_system(build_packcmd); + if (ec == -1) { _tremove(build_packname); ERROR_MSG(_T("Error: calling packer on \"%") NPRIs _T("\"\n"),build_packname); return PS_ERROR; } + if (ec != 0) + warning(_T("Packer returned %d, \"%") NPRIs _T("\" might still be unpacked\n"),ec,build_packname); int result = update_exehead(build_packname); _tremove(build_packname);