@@ -141,14 +141,8 @@ export class ZipUtil {
141141 return zipFilePath
142142 }
143143
144- protected getZipEntryPath ( projectName : string , relativePath : string , useCase ?: ZipUseCase ) {
145- // Workspaces with multiple folders have the folder names as the root folder,
146- // but workspaces with only a single folder don't. So prepend the workspace folder name
147- // if it is not present.
148- if ( useCase === ZipUseCase . TEST_GENERATION ) {
149- return path . join ( projectName , relativePath )
150- }
151- return relativePath . split ( '/' ) . shift ( ) === projectName ? relativePath : path . join ( projectName , relativePath )
144+ protected getZipEntryPath ( projectName : string , relativePath : string ) {
145+ return path . join ( projectName , relativePath )
152146 }
153147
154148 /**
@@ -423,7 +417,8 @@ export class ZipUtil {
423417 this . getProjectScanPayloadSizeLimitInBytes ( )
424418 )
425419 for ( const file of sourceFiles ) {
426- const zipEntryPath = this . getZipEntryPath ( file . workspaceFolder . name , file . relativeFilePath , useCase )
420+ const projectName = path . basename ( file . workspaceFolder . uri . fsPath )
421+ const zipEntryPath = this . getZipEntryPath ( projectName , file . relativeFilePath )
427422
428423 if ( ZipConstants . knownBinaryFileExts . includes ( path . extname ( file . fileUri . fsPath ) ) ) {
429424 if ( useCase === ZipUseCase . TEST_GENERATION ) {
0 commit comments