Fix bundle failing to extract empty file. (dotnet/core-setup#8462)
authorVitek Karas <vitek.karas@microsoft.com>
Fri, 4 Oct 2019 18:33:02 +0000 (11:33 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Oct 2019 18:33:02 +0000 (11:33 -0700)
commitd99b4454061146decd2340ad0b7e0a84c23723ec
treee3b98f6776d14024ea4312d5dac21a767ca8874e
parent8bce50e91df8ee6734670d5c0c9ee5c25f592b01
Fix bundle failing to extract empty file. (dotnet/core-setup#8462)

The file entry validity check marked empty files as invalid. This is wrong, the file size must be non-negative number.

Added a test and fixed the condition.

Commit migrated from https://github.com/dotnet/core-setup/commit/ed7ec9a245cd1fc6ce052dbf2487fc516f7b3f19
src/installer/corehost/cli/apphost/bundle/file_entry.cpp
src/installer/test/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs