coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.8k stars 356 forks source link

fix over-removing files during uninstall #156

Closed phizaz closed 4 years ago

phizaz commented 7 years ago

From issue #117, uninstall function will remove the whole "daemon" directory regardless of what's inside the directory. This could lead to the problem when there are more than one services in the same daemon directory redering another serivce could not be "uninstalled".

I fixed (and tested) by defining _other_files that will match only really "other files" and will be removed just that. If there are remaining files, the daemon directory will not be deleted (that indicates there are some other services files lingering inside)

ps. this is my first pull-request, suggestions are welcome.