diff --git a/src/constants.js b/src/constants.js index e0c9dc9..25f4010 100644 --- a/src/constants.js +++ b/src/constants.js @@ -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'; diff --git a/src/containers/MountItems/MountItems.js b/src/containers/MountItems/MountItems.js index f8eda84..89ab410 100644 --- a/src/containers/MountItems/MountItems.js +++ b/src/containers/MountItems/MountItems.js @@ -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()); }