nixpkgs/pkgs/tools/package-management/nix/xfs.patch
2015-02-18 10:41:39 +01:00

14 lines
631 B
Diff

diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 119e71a..422ec97 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -796,7 +796,7 @@ static void prim_readDir(EvalState & state, const Pos & pos, Value * * args, Val
for (auto & ent : entries) {
Value * ent_val = state.allocAttr(v, state.symbols.create(ent.name));
if (ent.type == DT_UNKNOWN)
- ent.type = getFileType(path);
+ ent.type = getFileType(path + "/" + ent.name);
mkStringNoCopy(*ent_val,
ent.type == DT_REG ? "regular" :
ent.type == DT_DIR ? "directory" :