From fcfd6175e68ce5de4f31085ff697c7452f4962ae Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Tue, 26 Nov 2019 16:53:39 -0600 Subject: [PATCH] Fix mount busy detection --- src/containers/MountItems/MountItems.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/containers/MountItems/MountItems.js b/src/containers/MountItems/MountItems.js index 9ac9228..9734632 100644 --- a/src/containers/MountItems/MountItems.js +++ b/src/containers/MountItems/MountItems.js @@ -227,6 +227,15 @@ class MountItems extends IPCContainer { ]; }; + hasActiveMount = () => { + for (const provider of Object.keys(this.props.MountState)) { + if (this.props.MountState[provider].Mounted) + return true; + } + + return false; + }; + onDetectMountReply = (event, arg) => { const provider = arg.data.Provider; if (!this.state.RetryItems[provider]) { @@ -268,7 +277,7 @@ class MountItems extends IPCContainer { if (idx > -1) { this.activeDetections.splice(idx, 1); } - this.props.setMountsBusy(this.activeDetections.length > 0); + this.props.setMountsBusy((this.activeDetections.length > 0) || this.hasActiveMount()); }; updateMountLocation = (provider, location, mounted, driveLetters) => {