aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-collect-garbage.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-collect-garbage.in')
-rwxr-xr-xscripts/nix-collect-garbage.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-collect-garbage.in b/scripts/nix-collect-garbage.in
index d0552fd2f..1effc14d6 100755
--- a/scripts/nix-collect-garbage.in
+++ b/scripts/nix-collect-garbage.in
@@ -3,7 +3,7 @@
use strict;
use IPC::Open2;
-my $linkdir = "@localstatedir@/nix/links";
+my $linkdir = "@localstatedir@/nix/profiles";
my $storedir = "@prefix@/store";
my %alive;
@@ -24,7 +24,7 @@ closedir DIR;
my @roots;
foreach my $link (@links) {
$link = $linkdir . "/" . $link;
- next if (!($link =~ /.id$/));
+ next if (!($link =~ /.gcroot$/));
open ROOT, "<$link" or die "cannot open $link: $!";
my $root = <ROOT>;
chomp $root;