Skip to content

Commit

Permalink
issue 3046
Browse files Browse the repository at this point in the history
  • Loading branch information
kimorkim committed Jun 14, 2016
1 parent 989a17e commit 94d568b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node"
],
"dependencies": {
"entryjs": "https://github.com/entrylabs/entryjs.git#1.3.1",
"entryjs": "https://github.com/entrylabs/entryjs.git#master",
"entry-hw": "https://github.com/entrylabs/entry-hw.git#master",
"jquery": "~1.11.3",
"jquery-ui": "~1.11.x",
Expand Down
11 changes: 8 additions & 3 deletions app/src/native_controll.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,14 @@ Entry.plugin = (function () {

if(!isNotFirst) {
var isTempRecovery = false;
var isExistFolder;
var tempProject = path.join(__dirname, 'temp');

if(localStorage.hasOwnProperty('tempProject')) {
if( fs.existsSync(tempProject) ) {
isExistFolder = fs.readdirSync(tempProject).length > 0;
}

if(localStorage.hasOwnProperty('tempProject') && isExistFolder) {
isTempRecovery = confirm(Lang.Workspace.restore_project_msg);
}

Expand All @@ -372,7 +378,6 @@ Entry.plugin = (function () {
});
} else {
var jsonObj = JSON.parse(localStorage.getItem('tempProject'));
jsonObj.path = load_path;
localStorage.setItem('nativeLoadProject', JSON.stringify(jsonObj));
if($.isFunction(cb)) {
cb();
Expand All @@ -386,7 +391,7 @@ Entry.plugin = (function () {
Entry.dispatchEvent('showLoadingPopup');
try{
var load_path = options.path;
var parser = path.parse(filePath);
var parser = path.parse(load_path);
localStorage.setItem('defaultPath', parser.dir);

that.loadProject(load_path, function (data) {
Expand Down

0 comments on commit 94d568b

Please sign in to comment.