File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ var FILETYPE_BY_EXTENSION = {
3838 octest : 'wrapper.cfbundle' ,
3939 pch : 'sourcecode.c.h' ,
4040 plist : 'text.plist.xml' ,
41+ png : "image.png" ,
4142 sh : 'text.script.sh' ,
4243 swift : 'sourcecode.swift' ,
4344 tbd : 'sourcecode.text-based-dylib-definition' ,
Original file line number Diff line number Diff line change @@ -1520,15 +1520,25 @@ function pbxBuildFileObj(file) {
15201520function pbxFileReferenceObj ( file ) {
15211521 var fileObject = {
15221522 isa : "PBXFileReference" ,
1523- name : "\"" + file . basename + "\"" ,
1524- path : "\"" + file . path . replace ( / \\ / g , '/' ) + "\"" ,
1523+ name : file . basename ,
1524+ path : file . path ,
15251525 sourceTree : file . sourceTree ,
15261526 fileEncoding : file . fileEncoding ,
15271527 lastKnownFileType : file . lastKnownFileType ,
15281528 explicitFileType : file . explicitFileType ,
15291529 includeInIndex : file . includeInIndex
15301530 } ;
15311531
1532+ if ( fileObject . name . indexOf ( "\"" ) !== - 1 ) {
1533+ fileObject . name = fileObject . name . replace ( / \" / g, "\\\"" ) ;
1534+ fileObject . path = fileObject . path . replace ( / \" / g, "\\\"" ) ;
1535+ }
1536+
1537+ if ( ! file . basename . match ( / ^ [ a - z A - Z 0 - 9 _ \. \$ ] + \. [ a - z A - Z ] + $ / ) ) {
1538+ fileObject . name = "\"" + fileObject . name + "\"" ;
1539+ fileObject . path = "\"" + fileObject . path + "\"" ;
1540+ }
1541+
15321542 return fileObject ;
15331543}
15341544
You can’t perform that action at this time.
0 commit comments