Apply upstream fix for Nix on XFS

Fixes #6424.
This commit is contained in:
Eelco Dolstra 2015-02-18 10:40:56 +01:00
parent cbab474cea
commit d6c88eaeb8
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "a30a5e801bc1cb1019cbc3456d961a307c45c9c588b8692cf1293ea6588ef01c";
};
patches = [ ./xfs.patch ];
nativeBuildInputs = [ perl pkgconfig ];
buildInputs = [ curl openssl sqlite ];

View File

@ -0,0 +1,13 @@
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" :