Partial version detection

This commit is contained in:
Scott E. Graves
2019-05-22 11:58:58 -05:00
parent 8adc98b8fa
commit 200534dccd
2 changed files with 18 additions and 4 deletions

View File

@@ -59,6 +59,9 @@ exports.PROVIDER_ARG = {
exports.IPC_Browse_Directory = 'browse_directory';
exports.IPC_Check_Daemon_Version = 'check_daemon_version';
exports.IPC_Check_Daemon_Version_Reply = 'check_daemon_version_reply';
exports.IPC_Check_Dependency_Installed = 'check_dependency_installed';
exports.IPC_Check_Dependency_Installed_Reply = 'check_dependency_installed';

View File

@@ -93,11 +93,22 @@ class MountItems extends IPCContainer {
this.props.errorHandler('Mount location is not set');
} else {
let allowAction = true;
if (mount && (this.props.platform !== 'win32')) {
const result = this.sendSyncRequest(Constants.IPC_Check_Mount_Location, {
Location: location,
if (mount) {
let result = this.sendSyncRequest(Constants.IPC_Check_Daemon_Version, {
StorageType: storageType,
Version: this.props.version
});
if (!result.Success) {
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());
}
}
} else {
allowAction = false;
this.props.errorHandler(result.Error.toString());
}