Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Tar] Fill in the file size even if the file is empty.
This matches standard behavior.
  • Loading branch information
sobczyk committed Aug 14, 2024
commit 6713babcedbaac73d28e1b32b43b1e80361d2a0f
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ private int WriteCommonFields(Span<byte> buffer, TarEntryType actualEntryType)
checksum += FormatNumeric(_gid, buffer.Slice(FieldLocations.Gid, FieldLengths.Gid));
}

if (_size > 0)
if (_size >= 0)
{
checksum += FormatNumeric(_size, buffer.Slice(FieldLocations.Size, FieldLengths.Size));
}
Expand Down