Skip to content

Commit

Permalink
swap out del with rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
firsara committed Jan 14, 2016
1 parent 5eb2bc8 commit 6139efe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
var ncp = require('ncp');
var del = require('del');
var rimraf = require('rimraf');
var semver = require('semver');
var gui = global.window.nwDispatcher.requireNwGui();

Expand Down Expand Up @@ -260,7 +260,7 @@

fs.exists(destinationDirectory, function(exists){
if(exists) {
del(destinationDirectory, {force: true}, function (err) {
rimraf(destinationDirectory, function (err) {
if (err) {
cb(err);
}
Expand Down Expand Up @@ -398,7 +398,7 @@
cb();
}
} else {
del(to, {force: true}, cb);
rimraf(to, cb);
}
}
function appCopied(err){
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"dependencies": {
"ncp": "^0.5.1",
"request": "~2.36.0",
"tar.gz": "^0.1.1",
"del": "~0.1.2",
"semver": "^3.0.1"
"rimraf": "^2.5.0",
"semver": "^3.0.1",
"tar.gz": "^0.1.1"
},
"devDependencies": {
"grunt-contrib-clean": "^0.5.0",
Expand Down

1 comment on commit 6139efe

@Mior
Copy link

@Mior Mior commented on 6139efe Mar 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed delete implementation in my pull request nwutils#105 as there were issue nwutils#90 when user opens folder, run nw.exe and keep folder open as it will remain locked. Therefore implementation was changed to rmDir which recursively removes files and folders keeping root folder untouched.

Please sign in to comment.