Handle release unavailable
This commit is contained in:
@@ -72,6 +72,12 @@ function setWindowVisibility(show) {
|
||||
}
|
||||
|
||||
const unmountAllDrives = () => {
|
||||
// Reset mount states
|
||||
for (const provider of Constants.PROVIDER_LIST) {
|
||||
clearManualMountDetection(provider);
|
||||
expectedUnmount[provider] = true;
|
||||
}
|
||||
|
||||
// Unmount all items
|
||||
for (const i in mountedLocations) {
|
||||
const data = mountedData[mountedLocations[i]];
|
||||
@@ -898,16 +904,21 @@ ipcMain.on(Constants.IPC_Show_Window + '_sync', event => {
|
||||
event.returnValue = true;
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Unmount_All_Drives, (event, data) => {
|
||||
unmountAllDrives();
|
||||
standardIPCReply(event, Constants.IPC_Unmount_All_Drives_Reply);
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Unmount_Drive, (event, data) => {
|
||||
clearManualMountDetection(data.Provider);
|
||||
|
||||
expectedUnmount[data.Provider] = true;
|
||||
helpers
|
||||
.stopMountProcess(data.Version, data.Provider)
|
||||
.then((result)=> {
|
||||
.then(result => {
|
||||
console.log(result);
|
||||
})
|
||||
.catch((e) => {
|
||||
.catch(e => {
|
||||
console.log(e);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user