File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -149,12 +149,12 @@ async function readFiles(sources) {
149
149
const data = await parseFile ( absFilePath ) ;
150
150
result . push ( _ . assign ( {
151
151
__metadata : {
152
- id : `${ relProjectPath } ` ,
152
+ id : `${ convertPathToPosix ( relProjectPath ) } ` ,
153
153
source : SOURCE ,
154
154
sourceName : name ,
155
- sourcePath : sourcePath ,
156
- relSourcePath : relSourcePath ,
157
- relProjectPath : relProjectPath
155
+ sourcePath : convertPathToPosix ( sourcePath ) ,
156
+ relSourcePath : convertPathToPosix ( relSourcePath ) ,
157
+ relProjectPath : convertPathToPosix ( relProjectPath )
158
158
}
159
159
} , data ) ) ;
160
160
} catch ( error ) {
@@ -165,3 +165,13 @@ async function readFiles(sources) {
165
165
} ) ;
166
166
return _ . chain ( result ) . flatten ( ) . value ( ) ;
167
167
}
168
+
169
+ function convertPathToPosix ( p ) {
170
+ if ( path . sep === path . posix . sep ) {
171
+ return p ;
172
+ }
173
+ if ( ! p ) {
174
+ return p ;
175
+ }
176
+ return p . split ( path . sep ) . join ( path . posix . sep ) ;
177
+ }
You can’t perform that action at this time.
0 commit comments