File tree Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 37
37
then "/"
38
38
else ""
39
39
) + normalizeRelativePath path ;
40
- combinePaths = a : b : if isAbsolutePath b
41
- then b
42
- else normalizePath ( a + "/" + b ) ;
40
+ combinePaths = a : b :
41
+ if isAbsolutePath b
42
+ then b
43
+ else normalizePath (
44
+ if a == ""
45
+ then b
46
+ else if b == ""
47
+ then a
48
+ else a + "/" + b
49
+ ) ;
43
50
# Like normalizePath but with a trailing / when needed
44
51
normalizeDir = dir :
45
52
let p = normalizePath dir ;
Original file line number Diff line number Diff line change @@ -314,14 +314,17 @@ in {
314
314
rootAndSubDir = src : rec {
315
315
subDir = src . origSubDir or "" ;
316
316
root =
317
- # Use `cleanSourceWith` to make sure the `filter` is still used
318
- if src ? origSrc && src ? filter && subDir != ""
319
- then haskellLib . cleanSourceWith {
320
- name = src . name or "source" + "-root" ;
321
- src = src . origSrc ;
322
- # Not passing src.origSubDir so that the result points `origSrc`
323
- inherit ( src ) filter ;
324
- }
325
- else src . origSrc or src ;
317
+ if subDir == ""
318
+ then src
319
+ else
320
+ # Use `cleanSourceWith` to make sure the `filter` is still used
321
+ if src ? origSrc && src ? filter && subDir != ""
322
+ then haskellLib . cleanSourceWith {
323
+ name = src . name or "source" + "-root" ;
324
+ src = src . origSrc ;
325
+ # Not passing src.origSubDir so that the result points `origSrc`
326
+ inherit ( src ) filter ;
327
+ }
328
+ else src . origSrc or src ;
326
329
} ;
327
330
}
You can’t perform that action at this time.
0 commit comments