diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-11-21 18:19:40 +0800 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-11-21 18:19:40 +0800 |
commit | 56e992ab54d3c2c9460f4c3515dad138674dd993 (patch) | |
tree | d1f95f78194c041dda7ec9a42a97181030c67559 /tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | |
parent | d39c407bf49fab58fa53c20bb3d301ee6e709c32 (diff) | |
download | tdebase-56e992ab54d3c2c9460f4c3515dad138674dd993.tar.gz tdebase-56e992ab54d3c2c9460f4c3515dad138674dd993.zip |
tdeioslave media: fixed FTBFS caused by previous commit and functionality of
tdeio_media_mounthelper when ejecting drives.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp')
-rw-r--r-- | tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp index 080fe7fa9..8d1e33c82 100644 --- a/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp +++ b/tdeioslave/media/mounthelper/tdeio_media_mounthelper.cpp @@ -177,9 +177,12 @@ void MountHelper::eject(const TQString &device, bool quiet) // Try TDE HW library eject first... TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device); - if (hwdevice->type() == TDEGenericDeviceType::Disk) { + if (hwdevice->type() == TDEGenericDeviceType::Disk) + { TDEStorageDevice *sdevice = static_cast<TDEStorageDevice*>(hwdevice); - if (sdevice->ejectDrive()) { + TQStringVariantMap ejectResult = sdevice->ejectDrive(); + if (ejectResult["result"].toBool() == true) + { // Success! ::exit(0); } |