From 8d813fe3e0c2c6c4236d03f8271c21ffce1dea6f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 May 2015 14:09:34 +0200 Subject: nix-collect-garbage: Remove redundant call to getFileType --- src/nix-collect-garbage/nix-collect-garbage.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix-collect-garbage') diff --git a/src/nix-collect-garbage/nix-collect-garbage.cc b/src/nix-collect-garbage/nix-collect-garbage.cc index ae75fd62103c..d8ddf9ec4c4c 100644 --- a/src/nix-collect-garbage/nix-collect-garbage.cc +++ b/src/nix-collect-garbage/nix-collect-garbage.cc @@ -38,7 +38,7 @@ void removeOldGenerations(std::string dir) checkInterrupt(); auto path = dir + "/" + i.name; - auto type = getFileType(path); + auto type = i.type == DT_UNKNOWN ? getFileType(path) : i.type; if (type == DT_LNK) { auto link = readLink(path); -- cgit 1.4.1