@@ -146,7 +146,7 @@ export class FileZipUtil {
146
146
public static async getZipFromUris ( fileUris : vscode . Uri [ ] ) {
147
147
const zip = new JSZip ( ) ;
148
148
fileUris . forEach ( ( uri ) => {
149
- const uriPath = path . resolve ( uri . fsPath ) ;
149
+ let uriPath = path . resolve ( uri . fsPath ) ?. replace ( / \\ / g , '/' ) ;
150
150
const stat = fs . statSync ( uriPath ) ;
151
151
if ( stat && stat . isDirectory ( ) ) {
152
152
FileZipUtil . buildZipFromDirectory ( uriPath , zip , path . dirname ( uriPath ) ) ;
@@ -169,14 +169,14 @@ export class FileZipUtil {
169
169
}
170
170
} ) ;
171
171
for ( let file of list ) {
172
- file = path . resolve ( dir , file ) ;
172
+ file = path . resolve ( dir , file ) ?. replace ( / \\ / g , '/' ) ;
173
173
if ( ! ignoredFiles . includes ( file ) ) {
174
174
const stat = fs . statSync ( file ) ;
175
175
if ( stat && stat . isDirectory ( ) ) {
176
176
FileZipUtil . buildZipFromDirectory ( file , zip , root , ignoredFiles ) ;
177
177
} else {
178
178
const filedata = fs . readFileSync ( file ) ;
179
- zip . file ( path . relative ( root , file ) , filedata ) ;
179
+ zip . file ( path . relative ( root , file ) ?. replace ( / \\ / g , '/' ) , filedata ) ;
180
180
}
181
181
}
182
182
0 commit comments