Added unmount

This commit is contained in:
Scott E. Graves
2018-12-10 00:04:18 -06:00
parent af836c305c
commit 61b2f6e6f6
4 changed files with 24 additions and 44 deletions

View File

@@ -19,7 +19,6 @@ class MountItems extends Component {
AllowMount: false,
DriveLetters: [],
Mounted: false,
PID: -1,
};
}
if (ipcRenderer) {
@@ -58,7 +57,7 @@ class MountItems extends Component {
}
};
handleMountUnMount = (storageType, mount, location, pid) => {
handleMountUnMount = (storageType, mount, location) => {
if (ipcRenderer) {
const state = {
...this.state[storageType],
@@ -82,7 +81,6 @@ class MountItems extends Component {
ipcRenderer.send(Constants.IPC_Unmount_Drive, {
Directory: this.props.directory,
Location: location,
PID: pid,
StorageType: storageType,
Version: this.props.version,
});
@@ -101,7 +99,6 @@ class MountItems extends Component {
AllowMount: true,
DriveLetters: (arg.data.DriveLetters[provider]),
Mounted: (arg.data.Locations[provider].length > 0),
PID: arg.data.PIDS[provider],
};
mountsBusy = mountsBusy || state[provider].Mounted;
}
@@ -135,7 +132,6 @@ class MountItems extends Component {
onMountDriveReply = (event, arg) => {
const state = {
...this.state[arg.data.StorageType],
PID: arg.data.PID,
Mounted: arg.data.Success,
};
this.setState({
@@ -188,7 +184,6 @@ class MountItems extends Component {
key={'mi_' + items.length}
location={this.props[providerLower].MountLocation}
mounted={this.state[provider].Mounted}
pid={this.state[provider].PID}
platform={this.props.platform}
title={provider} />
));