about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/normalise.cc7
-rw-r--r--src/libutil/util.cc2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/libstore/normalise.cc b/src/libstore/normalise.cc
index ae743c136fb5..87747837084c 100644
--- a/src/libstore/normalise.cc
+++ b/src/libstore/normalise.cc
@@ -1049,8 +1049,11 @@ void NormalisationGoal::createClosure()
 	   in it. */
         startNest(nest2, lvlChatty,
             format("scanning for store references in `%1%'") % path);
-        Strings refPaths = filterReferences(path, 
-            Strings(allPaths.begin(), allPaths.end()));
+        Strings refPaths;
+        if (!pathExists(path + "/nix-support/no-scan")) {
+            refPaths = filterReferences(path, 
+                Strings(allPaths.begin(), allPaths.end()));
+        }
         nest2.close();
 
 	/* Construct a closure element for this output path. */
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 43ec2b9f3be8..2a2dffb25d6f 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -115,7 +115,7 @@ bool pathExists(const Path & path)
     struct stat st;
     res = lstat(path.c_str(), &st);
     if (!res) return true;
-    if (errno != ENOENT)
+    if (errno != ENOENT && errno != ENOTDIR)
         throw SysError(format("getting status of %1%") % path);
     return false;
 }