Skip to content

Commit

Permalink
* fix failing renaming after unzip by deleting an already existing de…
Browse files Browse the repository at this point in the history
…stination folder
  • Loading branch information
Martin Schaaf committed May 12, 2015
1 parent 1b5f08a commit be9b3c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions download/index.js
Expand Up @@ -291,6 +291,9 @@ module.exports = yeoman.generators.Base.extend({
unzipper.on('extract', function () {
_this.log.ok('"tmp/%s.zip" successfully unzipped', platform);
if (fs.existsSync('resources/node-webkit/' + platform + '/nwjs.app')) {
if (fs.existsSync('resources/node-webkit/' + platform + '/node-webkit.app')) {
fs.removeSync('resources/node-webkit/' + platform + '/node-webkit.app');
}
fs.renameSync('resources/node-webkit/' + platform + '/nwjs.app', 'resources/node-webkit/' + platform + '/node-webkit.app');
}
defer.resolve();
Expand Down

0 comments on commit be9b3c9

Please sign in to comment.