From 06880d7ed8b8ef8658eb965e6614136c67988970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Mon, 15 May 2017 10:18:27 +0200 Subject: nix ls: support '/' for the root directory --- src/nix/ls.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nix') diff --git a/src/nix/ls.cc b/src/nix/ls.cc index 3476dfb05..417b7b421 100644 --- a/src/nix/ls.cc +++ b/src/nix/ls.cc @@ -61,6 +61,10 @@ struct MixLs : virtual Args showFile(curPath, relPath); }; + if (path == "/") { + path = ""; + } + auto st = accessor->stat(path); if (st.type == FSAccessor::Type::tMissing) throw Error(format("path ‘%1%’ does not exist") % path); -- cgit v1.2.3