do not try to normalize empty path strings

Fixes build breakage on non-Windows platforms.
This commit is contained in:
Jeff Williams 2014-10-30 12:19:47 -07:00
parent fc2b4ad3d2
commit 2224bee3be

View File

@ -58,10 +58,9 @@ function filepathMinusPrefix(filepath) {
var commonPrefix = path.commonPrefix(sourcePaths);
var result = '';
filepath = path.normalize(filepath);
if (filepath) {
// always use forward slashes
filepath = path.normalize(filepath);
// always use forward slashes in the result
result = (filepath + path.sep).replace(commonPrefix, '')
.replace(/\\/g, '/');
}