From 1cb030736ec1e844b3bfce32def3725c8a422a1c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 29 Jul 2003 17:56:39 +0000 Subject: [PATCH] * Bug: Fix does not allow empty names, so don't generate them. --- scripts/nix-pull.in | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/nix-pull.in b/scripts/nix-pull.in index f584b6abd..ff85ff9a6 100644 --- a/scripts/nix-pull.in +++ b/scripts/nix-pull.in @@ -30,16 +30,16 @@ while () { next if $fn =~ /\//; next unless $fn =~ /^([0-9a-z]{32})-([0-9a-z]{32})(.*)\.nar\.bz2$/; my $hash = $1; - my $id = $2; - my $outname = $3; - my $fsid; - if ($outname =~ /^-/) { - next unless $outname =~ /^-((s-([0-9a-z]{32}))?.*)$/; - $outname = $1; - $fsid = $3; - } else { - $outname = ""; - } + my $id = $2; + my $outname = $3; + my $fsid; + if ($outname =~ /^-/) { + next unless $outname =~ /^-((s-([0-9a-z]{32}))?.*)$/; + $outname = $1; + $fsid = $3; + } else { + $outname = "unnamed"; + } print "registering $id -> $url/$fn\n";