From fe1c5adbb269bd3ee24dc39f530d61b428015518 Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 26 Mar 2016 15:01:02 +0800 Subject: [PATCH] export fix --- game/game.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game/game.js b/game/game.js index 7fc5516c7..9fe618d18 100755 --- a/game/game.js +++ b/game/game.js @@ -9972,6 +9972,7 @@ var blob = zip.generate({type:"blob"}); var fileNameToSaveAs = packname||'noname'; fileNameToSaveAs=fileNameToSaveAs.replace(/\\|\/|\:|\?|\"|\*|\<|\>|\|/g,'.'); + fileNameToSaveAs+='.zip'; if(window.resolveLocalFileSystemURL){ window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory,function(entry){ @@ -9980,7 +9981,7 @@ fileWriter.onwriteend=function(){ alert('文件已导出至'+cordova.file.externalDataDirectory+fileNameToSaveAs); } - fileWriter.write(textFileAsBlob) + fileWriter.write(blob) }); }); });