diff options
| author | Gregg Caines <[email protected]> | 2014-03-17 18:37:31 -0700 |
|---|---|---|
| committer | Gregg Caines <[email protected]> | 2014-03-17 18:37:31 -0700 |
| commit | 15747afc13f515caaf818b6243672bd11dbeb126 (patch) | |
| tree | 6724611a8c7361f601693c488c88eb9f33ba4c22 /lib | |
| parent | 26581f2eeec2635c713ae6a438cce81bff458e4b (diff) | |
| parent | 91771c4ff7703fcc79a5066333678137a351f6d0 (diff) | |
| download | node-coveralls-15747afc13f515caaf818b6243672bd11dbeb126.tar.xz node-coveralls-15747afc13f515caaf818b6243672bd11dbeb126.zip | |
Merge branch 'master' of github.com:cainus/node-coveralls
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/convertLcovToCoveralls.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/convertLcovToCoveralls.js b/lib/convertLcovToCoveralls.js index b73863a..11c87b6 100644 --- a/lib/convertLcovToCoveralls.js +++ b/lib/convertLcovToCoveralls.js @@ -13,11 +13,12 @@ var detailsToCoverage = function(length, details){ }; var convertLcovFileObject = function(file, filepath){ - filepath = path.resolve(filepath, file.file); + var rootpath = filepath; + filepath = path.resolve(rootpath, file.file); var source = fs.readFileSync(filepath, 'utf8'); var lines = source.split("\n"); var coverage = detailsToCoverage(lines.length, file.lines.details); - return { name : file.file, + return { name : path.relative(rootpath, path.resolve(rootpath, file.file)), source : source, coverage : coverage }; }; |
