mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
udisks2: add support for 'safely removing storage'
mountutils lacks implemention of ejecting storage on Linux. Add that to our own code (not to mountutils as it is hard to do DBus calls from there).
This commit is contained in:
parent
b93fe29617
commit
dc6ef75333
4 changed files with 32 additions and 1 deletions
|
@ -775,7 +775,14 @@ void DownloadThread::_writeComplete()
|
|||
#endif
|
||||
|
||||
if (_ejectEnabled)
|
||||
{
|
||||
eject_disk(_filename.constData());
|
||||
#ifdef Q_OS_LINUX
|
||||
/* mountutils only implemented unmount and not eject on Linux. Do so through udisks2 */
|
||||
UDisks2Api udisks;
|
||||
udisks.ejectDrive(_filename);
|
||||
#endif
|
||||
}
|
||||
|
||||
emit success();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue