From 713850fcb43db829baaeb3889d44006b1c028eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 13 Dec 2019 12:54:28 +0100 Subject: [PATCH] fix failure due to superfluous slashes in path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- nix/tools/mkFilter.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/tools/mkFilter.nix b/nix/tools/mkFilter.nix index de71ffff1e..19dd1021ee 100644 --- a/nix/tools/mkFilter.nix +++ b/nix/tools/mkFilter.nix @@ -24,11 +24,13 @@ let root }: let allPathRootsAllowed = (length dirRootsToInclude) == 0; + # this removes superfluous slashes from the path + cleanRoot = "${toString (/. + root)}/"; in path: type: let baseName = baseNameOf (toString path); - subpath = elemAt (splitString "${toString root}/" path) 1; + subpath = elemAt (splitString cleanRoot path) 1; spdir = elemAt (splitString "/" subpath) 0; in lib.cleanSourceFilter path type && (