Skip to content

Commit

Permalink
Fix blank line written at the beginning of output file (close #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
idrassi committed Jun 6, 2023
1 parent e29a401 commit 29f6484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DirHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,7 @@ int _tmain(int argc, _TCHAR* argv[])
{
// add a new Line to the file to avoid issues with existing content
__int64 fileLength = _filelengthi64(_fileno(outputFile));
if (fileLength > 0)
if (fileLength > 3) // ignore UTF-8 BOM bytes which are always written by fopen when "ccs=UTF-8" specified
_ftprintf(outputFile, L"\n");
}
}
Expand Down

0 comments on commit 29f6484

Please sign in to comment.