Bundler: Fix bundling of empty files

This commit is contained in:
2015-06-13 14:25:30 +02:00
parent 8767f29e45
commit d1b5ab4dd8

View File

@@ -48,7 +48,10 @@ namespace Scrummer.Code
{ {
string fileContent = File.ReadAllText(fileName); string fileContent = File.ReadAllText(fileName);
byte[] byteArray = Encoding.UTF8.GetBytes(fileContent); byte[] byteArray = Encoding.UTF8.GetBytes(fileContent);
outStream.Write(byteArray, 0, byteArray.Length); if (byteArray.Length > 0)
{
outStream.Write(byteArray, 0, byteArray.Length);
}
} }
} }