Skip to content

Commit e1b5749

Browse files
authored
Fix source dirs with trailing slash (#445) (#446)
1 parent fe9b0da commit e1b5749

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/clean-cabal-component.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ let
1414
# Like normalizeRelativePath but with a trailing / when needed
1515
normalizeRelativeDir = dir:
1616
let p = normalizeRelativePath dir;
17-
in if p == "" then "" else p + "/";
17+
in if p == "" || p == "/"
18+
then ""
19+
else if lib.hasSuffix "/" p
20+
then p
21+
else p + "/";
1822
in
1923
if srcStr' == null || package.detailLevel != "FullDetails"
2024
then src

0 commit comments

Comments
 (0)