Fix not returning home on removable media ejection
AbandonedPublic

Authored by ngraham on Mar 1 2020, 1:24 AM.

Details

Reviewers
meven
elvisangelaccio
birkhoff
Group Reviewers
Dolphin
Summary

When current directory is in the removable media, upon ejection, return home instead of staying in the removable media directory.

BUG: 158934
FIXED-IN: 20.04.0

Test Plan

Used a flash drive to test eject functionality with or without terminal open in dolphin, previously only worked when terminal is open.

Diff Detail

Repository
R318 Dolphin
Branch
eject-fix
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23114
Build 23132: arc lint + arc unit
birkhoff created this revision.Mar 1 2020, 1:24 AM
Restricted Application added a project: Dolphin. · View Herald TranscriptMar 1 2020, 1:24 AM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
birkhoff requested review of this revision.Mar 1 2020, 1:24 AM

Apparently this patch will fix bug 158934.
With this patch, what will happen if the device is unmounted instead of ejected?

ngraham added a subscriber: ngraham.Mar 1 2020, 2:28 AM

Apparently this patch will fix bug 158934.

Thanks for digging that up!

With this patch, what will happen if the device is unmounted instead of ejected?

Same thing: the view switches to your home dir if you're currently viewing a path in the now-unmounted drive.

ngraham edited the summary of this revision. (Show Details)Mar 1 2020, 2:28 AM
ngraham accepted this revision.Mar 1 2020, 2:38 AM
ngraham added reviewers: meven, elvisangelaccio.
This revision is now accepted and ready to land.Mar 1 2020, 2:38 AM

Tested this patch myself on Arch Linux.
It does not work when I eject an optical disc. It works when I unmount ("Release") the disc instead.
Dolphin switches to Home before I enter password to confirm unmounting of internal hard disk partition.

Hmm, then it looks like we might want to instead implement the logic in PlacesItemModel::slotStorageTearDownDone(), after all the error handling. That way we can be sure the operation has fully completed and all errors are handled before we try to switch to the home dir path.

elvisangelaccio requested changes to this revision.Mar 14 2020, 6:21 PM

Hmm, then it looks like we might want to instead implement the logic in PlacesItemModel::slotStorageTearDownDone(), after all the error handling. That way we can be sure the operation has fully completed and all errors are handled before we try to switch to the home dir path.

+1

This revision now requires changes to proceed.Mar 14 2020, 6:21 PM

@birkhoff, are you interested in making that change?

Guess not. I will commandeer and continue with a Gitlab MR.

ngraham commandeered this revision.Oct 13 2020, 5:56 PM
ngraham edited reviewers, added: birkhoff; removed: ngraham.

Re-submitted with a different approach in https://invent.kde.org/system/dolphin/-/merge_requests/76.

ngraham abandoned this revision.Oct 13 2020, 5:56 PM