Skip to content
This repository was archived by the owner on Jul 13, 2024. It is now read-only.

WIP don't merge #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

WIP don't merge #1

wants to merge 1 commit into from

Conversation

jasonblanchard
Copy link

No description provided.

@@ -392,6 +392,7 @@
}
}
function deleteApp(cb){
// TODO: Fix this delete process
del(to, {force: true}, cb);
Copy link
Author

Choose a reason for hiding this comment

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

@natorojr Here's where the problem is with the auto update process on Windows as documented in this ticket: nwutils#90

We're pretty much using this boilderplate https://github.com/apprennet/node-webkit-updater/blob/master/examples/basic.js#L25. It happens in step 5 right here https://github.com/apprennet/node-webkit-updater/blob/master/examples/basic.js#L25 where the updater attempts to remove all the files in the currently installed version and replace them with the files from the updated version.

What's happening is that there are some files that Windows and/or Node Webkit create when you start the app that are "in use" when the app is running. This results in the EBUSY error when it's trying to unlink them. (Also, if you try to delete the same files from the GUI, it won't let you because they are 'in use,' which I think is basically the same error).

I got a solution working where instead of removing the entire to directory, we delete specific files:

del(['ApprenNet Recorder.exe', 'icudtl.dat', ...], {force: true}, db);

But that seemed like a hack and difficult to maintain.

I suspect there's a Windows/Node way to get around that EBUSY error but haven't found anything compelling yet.

@Mior
Copy link

Mior commented Mar 10, 2016

I have fixed this issue thanks to your input in this pull request. nwutils#105 It recursively remove all files and folders but root.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants