diff options
| author | Bob Arnson <bob@firegiant.com> | 2019-03-21 20:57:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-21 20:57:25 -0400 |
| commit | cffb36e86c2993b43ac5bdbded4af063c2963a4f (patch) | |
| tree | ac9324889b60e1f0c794fa829544002468c57174 /src | |
| parent | 0ef921687dd07e7c298b1c7533e51982c56f8d28 (diff) | |
| parent | 0fd0f531db8250a121939dc9d453a236b477ae7a (diff) | |
| download | wix-cffb36e86c2993b43ac5bdbded4af063c2963a4f.tar.gz wix-cffb36e86c2993b43ac5bdbded4af063c2963a4f.tar.bz2 wix-cffb36e86c2993b43ac5bdbded4af063c2963a4f.zip | |
Merge pull request #1 from wixtoolset/bob/EmptyCabsAreJustFine
Avoid hang when a .cab is has no files.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wixnative/smartcab.cpp | 7 |
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. |
