about summary refs log tree commit diff
path: root/read-tree.nix
diff options
context:
space:
mode:
Diffstat (limited to 'read-tree.nix')
-rw-r--r--read-tree.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/read-tree.nix b/read-tree.nix
index 82d5f040b2bc..052865914e5b 100644
--- a/read-tree.nix
+++ b/read-tree.nix
@@ -56,6 +56,6 @@ let
         value = importWithMark p (parts ++ [ c ]);
       }) nixFiles;
     in if dir ? "default.nix"
-      then self // (listToAttrs children)
+      then (if isAttrs self then self // (listToAttrs children) else self)
       else listToAttrs (nixChildren ++ children);
 in readTree initPath [ (baseNameOf initPath) ]