From: yons.kim Date: Thu, 14 Jan 2016 02:09:58 +0000 (+0900) Subject: Fix bug that writes wrong file permission X-Git-Tag: accepted/tizen/mobile/20160126.050924~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a36d2502d76d593ced3fe43622b91f85003f239b;p=platform%2Fframework%2Fnative%2Fjsnative.git Fix bug that writes wrong file permission Should use mode 'Number' with the prefix '0o'such as 666 -> 0o666 when fs module is used Change-Id: Iea514c328993b09b77e9533557c7a7c110fae2c6 --- diff --git a/cli/lib/create.js b/cli/lib/create.js index e557691..db422fb 100755 --- a/cli/lib/create.js +++ b/cli/lib/create.js @@ -167,7 +167,7 @@ // Checking whether the 'appId' exists var app = parser.getAppSync(appId); if (app) { - throw new JsnError(appId + " already exists"); + throw new JsnError(appId + ' already exists'); } }) @@ -195,7 +195,7 @@ parser.get('package').pkg_id + '.' + appId); return Q.denodeify(fs.writeFile)(binPath, binContent, - { mode: 775 }); + { mode: 0o775 }); }); }) @@ -222,7 +222,7 @@ path.join(path.join(parser.get('exec_path'), 'res', appId), 'index.js'); return Q.denodeify(fs.writeFile)(indexPath, indexContent, - { mode: 775 }); + { mode: 0o775 }); }); }) @@ -232,4 +232,4 @@ }); } // createApp } // create -}()); \ No newline at end of file +}());