File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,17 @@ export class FileSystemUtils {
5656 const normalizedSegments = this . normalizeSegments ( segments ) ;
5757
5858 if ( this . isWindowsBasePath ( basePath ) ) {
59+ const normalizedBasePath = path . win32 . normalize ( basePath ) ;
5960 return normalizedSegments . length
60- ? path . win32 . join ( basePath , ...normalizedSegments )
61- : path . win32 . normalize ( basePath ) ;
61+ ? path . win32 . join ( normalizedBasePath , ...normalizedSegments )
62+ : normalizedBasePath ;
6263 }
6364
65+ const posixBasePath = basePath . replace ( / \\ / g, '/' ) ;
66+
6467 return normalizedSegments . length
65- ? path . join ( basePath , ...normalizedSegments )
66- : path . join ( basePath ) ;
68+ ? path . posix . join ( posixBasePath , ...normalizedSegments )
69+ : path . posix . normalize ( posixBasePath ) ;
6770 }
6871
6972 static async createDirectory ( dirPath : string ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments