| 548 | | } |
|---|
| | 549 | } |
|---|
| | 550 | |
|---|
| | 551 | //copy the patch's parent directory if we need to and if the patch has been saved. |
|---|
| | 552 | //******* FIXME ******** won't work with absolute paths, won't work with subfolders. |
|---|
| | 553 | if(obj.includeParentDirCbx && Lily.patchObj[id].file) { |
|---|
| | 554 | |
|---|
| | 555 | //copy the patch's parent dir |
|---|
| | 556 | var parentDir = Lily.patchObj[id].file.parent.clone(); |
|---|
| | 557 | |
|---|
| | 558 | //recurse thru the resources dir converting text files as needed. |
|---|
| | 559 | LilyUtils.directorySearch(parentDir,function(file) { |
|---|
| | 560 | |
|---|
| | 561 | var tmpOut = contentOut.clone(); |
|---|
| | 562 | var testExist = contentOut.clone(); |
|---|
| | 563 | testExist.append(file.leafName); |
|---|
| | 564 | |
|---|
| | 565 | if(!testExist.exists()) { |
|---|
| | 566 | if(LilyUtils.isText(file.leafName)) { |
|---|
| | 567 | tmpOut.append(file.leafName); |
|---|
| | 568 | LilyUtils.writeFile(tmpOut,LilyUtils.readFile(file).replace(/chrome:\/\/lily/g,("chrome://"+projectName))); |
|---|
| | 569 | } else { |
|---|
| | 570 | file.copyTo(tmpOut,null); |
|---|
| | 571 | } |
|---|
| | 572 | } |
|---|
| | 573 | }) |
|---|
| | 574 | } |
|---|
| 868 | | } |
|---|
| | 894 | } |
|---|
| | 895 | |
|---|
| | 896 | //copy the patch's parent directory if we need to and if the patch has been saved. |
|---|
| | 897 | //******* FIXME ******** won't work with absolute paths, won't work with subfolders. |
|---|
| | 898 | if(obj.includeParentDirCbx && Lily.patchObj[id].file) { |
|---|
| | 899 | |
|---|
| | 900 | //copy the patch's parent dir |
|---|
| | 901 | var parentDir = Lily.patchObj[id].file.parent.clone(); |
|---|
| | 902 | |
|---|
| | 903 | //recurse thru the resources dir converting text files as needed. |
|---|
| | 904 | LilyUtils.directorySearch(parentDir,function(file) { |
|---|
| | 905 | |
|---|
| | 906 | var tmpOut = contentOut.clone(); |
|---|
| | 907 | var testExist = contentOut.clone(); |
|---|
| | 908 | testExist.append(file.leafName); |
|---|
| | 909 | |
|---|
| | 910 | if(!testExist.exists()) { |
|---|
| | 911 | if(LilyUtils.isText(file.leafName)) { |
|---|
| | 912 | tmpOut.append(file.leafName); |
|---|
| | 913 | LilyUtils.writeFile(tmpOut,LilyUtils.readFile(file).replace(/chrome:\/\/lily/g,("chrome://"+projectName))); |
|---|
| | 914 | } else { |
|---|
| | 915 | file.copyTo(tmpOut,null); |
|---|
| | 916 | } |
|---|
| | 917 | } |
|---|
| | 918 | |
|---|
| | 919 | }) |
|---|
| | 920 | } |
|---|