Skip to content

Commit 03e45c8

Browse files
committed
Fixing excluded paths normalizing for windows at filet-tree
1 parent f11c7fd commit 03e45c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/file-tree/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ var config = {
2828
// Overwriting base options
2929
deepExtend(config, global.opts.core.fileTree);
3030

31+
var normalizedPathToApp = global.pathToApp.replace(/\\/g, '/');
32+
3133
var prepareExcludesRegex = function(){
3234
var dirsForRegExp = '';
3335
var i = 1;
@@ -67,7 +69,7 @@ var fileTree = function (dir) {
6769
//on first call we add includedDirs
6870
if (dir === config.specsRoot) {
6971
config.includedDirs.map(function (includedDir) {
70-
dirContent.push(path.join(global.pathToApp, includedDir));
72+
dirContent.push(path.join(normalizedPathToApp, includedDir));
7173
});
7274
}
7375

@@ -106,7 +108,7 @@ var fileTree = function (dir) {
106108
urlForJson = urlFromHostRoot.replace(config.specsRoot, '');
107109
} else {
108110
// Cleaning path for included folders
109-
urlForJson = urlFromHostRoot.replace(global.pathToApp, '');
111+
urlForJson = urlFromHostRoot.replace(normalizedPathToApp, '');
110112
}
111113

112114
//Removing filename from path

0 commit comments

Comments
 (0)