@@ -360,6 +360,38 @@ describe("AppPackager", () => {
360360 // along with the custom ignored file
361361 } ) ;
362362
363+ it ( "should use forward slashes in zip entry paths for nested files" , async ( ) => {
364+ // Create files in subdirectories to exercise the path separator fix
365+ await fs . mkdirp ( path . join ( tempDir , "lib" ) ) ;
366+ await fs . mkdirp ( path . join ( tempDir , "assets" , "icons" ) ) ;
367+ await fs . writeFile (
368+ path . join ( tempDir , "lib" , "helper.json" ) ,
369+ '{"ok":true}' ,
370+ ) ;
371+ await fs . writeFile (
372+ path . join ( tempDir , "assets" , "icons" , "logo.png" ) ,
373+ "fake png" ,
374+ ) ;
375+
376+ const outputFile = path . join ( tempDir , "output.zip" ) ;
377+ const packager = new AppPackager (
378+ compilerDesc ,
379+ folderDetails ,
380+ compilationResult ,
381+ outputFile ,
382+ ) ;
383+
384+ await packager . zipItUp ( ) ;
385+
386+ const zipContents = await getZipFileList ( outputFile ) ;
387+
388+ // Regardless of the host OS separator, zip entry paths must use "/"
389+ expect ( zipContents ) . to . include ( "lib/helper.json" ) ;
390+ expect ( zipContents ) . to . include ( "assets/icons/logo.png" ) ;
391+ expect ( zipContents ) . to . not . include ( "lib\\helper.json" ) ;
392+ expect ( zipContents ) . to . not . include ( "assets\\icons\\logo.png" ) ;
393+ } ) ;
394+
363395 it ( "should handle .rcappsconfig without ignoredFiles property" , async ( ) => {
364396 // Create .rcappsconfig without ignoredFiles property
365397 const rcAppsConfig = {
0 commit comments