[partial] #30: Add uninstall feature with reboot to handle WinFSP upgrades/downgrades

This commit is contained in:
2019-08-13 14:06:50 -05:00
parent 9f45b0f03f
commit fa130c7dd1
10 changed files with 98 additions and 14 deletions

View File

@@ -886,6 +886,13 @@ ipcMain.on(Constants.IPC_Mount_Drive, (event, data) => {
}
});
ipcMain.on(Constants.IPC_Reboot_System, () => {
if (os.platform() === 'win32') {
helpers.executeAsync('shutdown.exe', ['/r', '/t', '30']);
}
closeApplication();
});
ipcMain.on(Constants.IPC_Save_State, (event, data) => {
helpers.mkDirByPathSync(helpers.getDataDirectory());
const configFile = path.join(helpers.getDataDirectory(), 'settings.json');