about summary refs log tree commit diff
path: root/src/nix-collect-garbage
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-21T12·09+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-21T12·09+0200
commit8d813fe3e0c2c6c4236d03f8271c21ffce1dea6f (patch)
treec3b4ee3e85b21cbb44cf9fb6bf98c42362042137 /src/nix-collect-garbage
parenta1c1bf3a56fbe7c01dd86fa6b089a2a281f00fc4 (diff)
nix-collect-garbage: Remove redundant call to getFileType
Diffstat (limited to 'src/nix-collect-garbage')
-rw-r--r--src/nix-collect-garbage/nix-collect-garbage.cc2
1 files changed, 1 insertions, 1 deletions
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);