Bug 446280 - Removable device mounted in PTP mode is unexpectedly present under Remote > Network > MTP Devices
Summary: Removable device mounted in PTP mode is unexpectedly present under Remote > N...
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-30 15:16 UTC by Patrick Silva
Modified: 2022-01-06 12:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot (22.73 KB, image/png)
2021-11-30 15:16 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-11-30 15:16:44 UTC
Created attachment 144085 [details]
screenshot

STEPS TO REPRODUCE
1. connect an Android device to usb port
2. set usb mode of your Android device to MTP
3. open Dolphin by pressing meta+e
4. go to Remote > Network > MTP Devices, open your Android device and open any file in it
5. close the file, go to Home and do NOT close Dolphin
6. change the usb mode of your Android device to PTP
7. try to open a file in your Android device again by repeating the step 4

OBSERVED RESULT
"The file or folder /path/file does not exist." error message seen in the attached screenshot.

EXPECTED RESULT
Android device mounted in PTP usb mode should never be present under Remote > Network > MTP Devices.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.3
Graphics Platform: X11t
Comment 1 Harald Sitter 2021-12-01 10:40:26 UTC
That is consistent behavior, is it not? If you navigate to a samba share and unplug the ethernet cable the file listing remains and clicking on a file results in an error. Same for all protocols that depend on a remote.

I mean, technically this can be solved by kio-mtp implementing kdirnotify, but I'm not sure that is actually worthwhile because all protocols works this way.
Comment 2 Patrick Silva 2021-12-01 10:53:51 UTC
If I switch the usb mode of my device while Dolphin is running, the new mode is not detected until Dolphin is restarted.
I don't think this is the expected behavior.
Comment 3 Harald Sitter 2022-01-06 12:01:48 UTC
Master now throws away the view after 5 seconds