fix failure due to superfluous slashes in path

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-12-13 12:54:28 +01:00
parent aca703a011
commit 713850fcb4
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 3 additions and 1 deletions

View File

@ -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 && (