Improved mount state detection
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
## 1.1.1
|
## 1.1.1
|
||||||
* \#43: Support for remote UNIX mounts
|
* \#43: Support for remote UNIX mounts
|
||||||
|
* Improved mount state detection
|
||||||
|
|
||||||
## 1.1.0
|
## 1.1.0
|
||||||
* \#40: Support for remote Windows mounts
|
* \#40: Support for remote Windows mounts
|
||||||
|
|||||||
@@ -228,20 +228,23 @@ class MountItems extends IPCContainer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onDetectMountReply = (event, arg) => {
|
onDetectMountReply = (event, arg) => {
|
||||||
if (!this.state.DisplayRetry && arg.data.Success) {
|
const provider = arg.data.Provider;
|
||||||
const provider = arg.data.Provider;
|
if (!this.state.RetryItems[provider]) {
|
||||||
const mountState = {
|
if (arg.data.Success && (!arg.data.Active || (arg.data.Location && (arg.data.Location.length > 0)))) {
|
||||||
AllowMount: true,
|
const mountState = {
|
||||||
DriveLetters: (arg.data.DriveLetters),
|
AllowMount: true,
|
||||||
Mounted: (arg.data.Location.length > 0),
|
DriveLetters: arg.data.DriveLetters,
|
||||||
};
|
Mounted: arg.data.Active,
|
||||||
this.props.setMountState(provider, mountState);
|
};
|
||||||
|
this.props.setMountState(provider, mountState);
|
||||||
|
|
||||||
this.updateMountLocation(provider, arg.data.Location, mountState.Mounted, arg.data.DriveLetters);
|
this.updateMountLocation(provider, arg.data.Location, mountState.Mounted, arg.data.DriveLetters);
|
||||||
this.props.setAutoMountProcessed(provider,true);
|
this.props.setAutoMountProcessed(provider, true);
|
||||||
this.removeMountsBusy(provider);
|
this.removeMountsBusy(provider);
|
||||||
} else {
|
} else {
|
||||||
this.props.notifyError(arg.data.Error);
|
this.detectMount(provider);
|
||||||
|
this.removeMountsBusy(provider);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -177,8 +177,10 @@ const addListeners = (ipcMain, setTrayImage, standardIPCReply) => {
|
|||||||
firstMountCheck = false;
|
firstMountCheck = false;
|
||||||
}
|
}
|
||||||
standardIPCReply(event, Constants.IPC_Detect_Mount_Reply, {
|
standardIPCReply(event, Constants.IPC_Detect_Mount_Reply, {
|
||||||
|
Active: storageData[provider].Active,
|
||||||
DriveLetters: driveLetters[provider],
|
DriveLetters: driveLetters[provider],
|
||||||
Location: locations[provider],
|
Location: locations[provider],
|
||||||
|
PID: storageData[provider].PID,
|
||||||
Provider: provider,
|
Provider: provider,
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user