Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed uninstall process for services sharing same daemon directory. #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jdziat
Copy link
Collaborator

@jdziat jdziat commented Aug 30, 2016

If multiple services exist for the same daemon directory the current uninstall method tries to remove all documents within the daemon directory. Not just the one being uninstalled. This may leave an artifact from extra files created and the folder itself but that would be preferable to the other services '.exe' getting deleted.

changed

// Remove all other files
              var _files = fs.readdirSync(me.root);
              _files.forEach(function(f){
                rm(f);
              });

              if (me.root !== path.dirname(me.script)){
                fs.rmdir(me.root,function(){
                  sleep(1);
                  me.emit('uninstall');
                });
              } else {
                me.emit('uninstall');
              }

to
me.emit('uninstall');

@coreybutler
Copy link
Owner

Did anything actually change in the daemon.js (first commit)? It looks like the code didn't actually change, but it got moved all over the place.

@jdziat
Copy link
Collaborator Author

jdziat commented Sep 2, 2016

The block of code was removed from lines 496 to 512 and replaced with just the me.emit('uninstall')

@coreybutler
Copy link
Owner

@jdziat - could you rebase to prevent merge conflicts? I'll merge this and make you a maintainer as soon as that happens. Sorry for the delay (had alot come up over the last week and a half).

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

Successfully merging this pull request may close these issues.

None yet

2 participants