aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wixnative/smartcab.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wixnative/smartcab.cpp b/src/wixnative/smartcab.cpp
index da9087a3..0dff6c94 100644
--- a/src/wixnative/smartcab.cpp
+++ b/src/wixnative/smartcab.cpp
@@ -64,8 +64,11 @@ HRESULT SmartCabCommand(
64 hr = CabCBegin(wzCabName, sczCabDir, uiFileCount, uiMaxSize, uiMaxThresh, ct, &hCab); 64 hr = CabCBegin(wzCabName, sczCabDir, uiFileCount, uiMaxSize, uiMaxThresh, ct, &hCab);
65 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "failed to initialize cabinet: %ls", wzCabPath); 65 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "failed to initialize cabinet: %ls", wzCabPath);
66 66
67 hr = CompressFiles(hCab); 67 if (uiFileCount > 0)
68 ExitOnFailure(hr, "failed to compress files into cabinet: %ls", wzCabPath); 68 {
69 hr = CompressFiles(hCab);
70 ExitOnFailure(hr, "failed to compress files into cabinet: %ls", wzCabPath);
71 }
69 72
70 hr = CabCFinish(hCab, CabNamesCallback); 73 hr = CabCFinish(hCab, CabNamesCallback);
71 hCab = NULL; // once finish is called, the handle is invalid. 74 hCab = NULL; // once finish is called, the handle is invalid.