summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-08-05 10:01:39 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-08-05 10:01:39 +0000
commitfa5dac37e1486270add9b3c1ec82be160a517f20 (patch)
treee0da8422218e7875260cf09daf109cc9729eb5b2
parent9c25bd59d9d3d93f2d47e1c26b369d7bd4ffef44 (diff)
fix splitting bug
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index c0647155059..d5576a48535 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.31 2005/07/25 11:26:01 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.32 2005/08/05 10:01:38 espie Exp $
#
# Copyright (c) 2002-2004 Marc Espie <espie@openbsd.org>
#
@@ -177,8 +177,8 @@ sub mkheader
die "Can't fit such a name $name\n";
} else {
$prefix = '';
- while (length($name) > MAXFILENAME && $name =~ m/^(.*\/)(.*)$/) {
- $prefix =$1;
+ while (length($name) > MAXFILENAME && $name =~ m/^(.*?\/)(.*)$/) {
+ $prefix .= $1;
$name = $2;
}
$prefix =~ s|/$||;