#22: Display error if daemon version is too low

This commit is contained in:
Scott E. Graves
2019-05-24 12:38:31 -05:00
parent 200534dccd
commit 234785180a
3 changed files with 79 additions and 7 deletions

View File

@@ -95,18 +95,24 @@ class MountItems extends IPCContainer {
let allowAction = true;
if (mount) {
let result = this.sendSyncRequest(Constants.IPC_Check_Daemon_Version, {
Directory: this.props.directory,
StorageType: storageType,
Version: this.props.version
});
if (result.Success) {
if (this.props.platform !== 'win32') {
result = this.sendSyncRequest(Constants.IPC_Check_Mount_Location, {
Location: location,
});
if (!result.Success) {
allowAction = false;
this.props.errorHandler(result.Error.toString());
if (result.Valid) {
if (this.props.platform !== 'win32') {
result = this.sendSyncRequest(Constants.IPC_Check_Mount_Location, {
Location: location,
});
if (!result.Success) {
allowAction = false;
this.props.errorHandler(result.Error.toString());
}
}
} else {
allowAction = false;
this.props.errorHandler("Incompatible " + storageType + " daemon. Please upgrade " + storageType);
}
} else {
allowAction = false;