summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2023-05-27 10:07:34 +0000
committerMarc Espie <espie@cvs.openbsd.org>2023-05-27 10:07:34 +0000
commit89a335f6042ef6f0dc1ec821d898cf72c632a305 (patch)
tree01b8cbb1acfb306824e5d93248489e50e86b9483 /usr.sbin
parentc6568aa88e84c2a5f648d310243bf09ac24d31aa (diff)
comment/cosmetic
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index bb958cbdd16..608668eba2c 100644
--- a/usr.sbin/pkg_add/OpenBSD/Ustar.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Ustar.pm,v 1.94 2023/05/16 16:55:32 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.95 2023/05/27 10:07:33 espie Exp $
#
# Copyright (c) 2002-2014 Marc Espie <espie@openbsd.org>
#
@@ -901,8 +901,8 @@ sub write_contents
my $filename = $self->{realname};
my $size = $self->{size};
my $out = $arc->{fh};
- open my $fh, "<", $filename or $self->_fatal("Can't read file #1: #2",
- $filename, $!);
+ open my $fh, "<", $filename or
+ $self->_fatal("Can't read file #1: #2", $filename, $!);
my $buffer;
my $toread = $size;
@@ -923,6 +923,7 @@ sub write_contents
$toread -= $actual;
$self->_left_todo($toread);
}
+ # explicitly pad archive to 512 bytes blocksize
if ($size % 512) {
print $out "\0" x (512 - $size % 512) or
$self->_fatal("Error writing to archive: #1", $!);
@@ -953,6 +954,7 @@ sub copy_contents
$toread -= $actual;
}
+ # explicitly pad archive to 512 bytes blocksize
if ($size % 512) {
print $out "\0" x (512 - $size % 512) or
$self->_fatal("Error writing to archive: #1", $!);