about summary refs log tree commit diff
path: root/scripts/nix-push.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-push.in')
-rwxr-xr-xscripts/nix-push.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in
index c388429ec2ef..51106657bb0c 100755
--- a/scripts/nix-push.in
+++ b/scripts/nix-push.in
@@ -218,12 +218,12 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
         }
     }
 
-    my $infoName = hashString("sha256", 1, $storePath);
+    my $pathHash = substr(basename($storePath), 0, 32);
     
     if ($localCopy) {
-        my $dst = "$localArchivesDir/$infoName.narinfo";
+        my $dst = "$localArchivesDir/$pathHash.narinfo";
         if ($force || ! -f $dst) {
-            my $tmp = "$localArchivesDir/.tmp.$$.$infoName";
+            my $tmp = "$localArchivesDir/.tmp.$$.$pathHash.narinfo";
             open INFO, ">$tmp" or die;
             print INFO "$info" or die;
             close INFO or die;