From fa5dac37e1486270add9b3c1ec82be160a517f20 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Fri, 5 Aug 2005 10:01:39 +0000 Subject: fix splitting bug --- usr.sbin/pkg_add/OpenBSD/Ustar.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/pkg_add/OpenBSD/Ustar.pm') 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 # @@ -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|/$||; -- cgit v1.2.3