Single mount detection
This commit is contained in:
@@ -86,7 +86,9 @@ const addListeners = (ipcMain, setTrayImage, standardIPCReply) => {
|
||||
event.returnValue = response;
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Detect_Mounts, (event, data) => {
|
||||
ipcMain.on(Constants.IPC_Detect_Mount, (event, data) => {
|
||||
const provider = data.Provider;
|
||||
|
||||
let driveLetters = {};
|
||||
const providerList = [
|
||||
...Constants.PROVIDER_LIST,
|
||||
@@ -174,9 +176,10 @@ const addListeners = (ipcMain, setTrayImage, standardIPCReply) => {
|
||||
if (firstMountCheck) {
|
||||
firstMountCheck = false;
|
||||
}
|
||||
standardIPCReply(event, Constants.IPC_Detect_Mounts_Reply, {
|
||||
DriveLetters: driveLetters,
|
||||
Locations: locations,
|
||||
standardIPCReply(event, Constants.IPC_Detect_Mount_Reply, {
|
||||
DriveLetters: driveLetters[provider],
|
||||
Location: locations[provider],
|
||||
Provider: provider,
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -184,8 +187,9 @@ const addListeners = (ipcMain, setTrayImage, standardIPCReply) => {
|
||||
grabDriveLetters({});
|
||||
}
|
||||
setImage({});
|
||||
standardIPCReply(event, Constants.IPC_Detect_Mounts_Reply, {
|
||||
DriveLetters: driveLetters,
|
||||
standardIPCReply(event, Constants.IPC_Detect_Mount_Reply, {
|
||||
DriveLetters: driveLetters[provider],
|
||||
Provider: provider,
|
||||
}, error);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user