Bug 424247 - After opening a file on FTP, MTP, trying to open another file will show an error
Summary: After opening a file on FTP, MTP, trying to open another file will show an error
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 20.04.3
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 18:18 UTC by Andy3153
Modified: 2020-10-29 22:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Showing the error and the path it tries to go to (204.89 KB, image/png)
2020-07-15 18:18 UTC, Andy3153
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy3153 2020-07-15 18:18:53 UTC
Created attachment 130144 [details]
Showing the error and the path it tries to go to

SUMMARY

If you open a file off of an FTP server/device with MTP that you connected to using Dolphin, if you open another file afterwards it will try to go into the previous file as if it was a folder.

STEPS TO REPRODUCE
1. Open any file on an FTP server/device with MTP with File > Open or Ctrl + O
2. Try to open another file with the same dialog

OBSERVED RESULT

Instead of opening the folder the most recent file was opened from, it tries to open the most recent file as a folder, and give the "/path/to/file/file.txt is a file, but a folder was expected."

EXPECTED RESULT

After opening a file in the Open dialog or the Ctrl + O shortcut, and then opening another file using the same dialog, it should open the folder where the recently opened file is in

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: Arch Linux, Linux 5.7.8-arch1-1
(available in About System)
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
I am not sure if this only happens on FTP servers or MTP devices, it could as well happen for any other file transfer protocol that doesn't get mounted into the filesystem. I thought it happens with things connected through the network like the aforementioned FTP or maybe even WebDav, but it doesn't happen with SSHFS, since it gets actually mounted into the filesystem. And, I'm not sure it happens if you connect to the FTP server/MTP device with another program or with another method
Comment 1 Justin Zobel 2020-10-29 00:56:38 UTC
I can't replicate this on kate from git master.

Steps I used:
Open an ftp site in dolphin, opened a file that would load in kate
In the same dolphin window opened a text file from my home folder

Both loaded OK

Andy can you please re-test and confirm if this is still an issue for you?
Comment 2 Andy3153 2020-10-29 16:50:29 UTC
(In reply to Justin Zobel from comment #1)
> I can't replicate this on kate from git master.
> 
> Steps I used:
> Open an ftp site in dolphin, opened a file that would load in kate
> In the same dolphin window opened a text file from my home folder
> 
> Both loaded OK
> 
> Andy can you please re-test and confirm if this is still an issue for you?

Now, with the latest version of Kate and anything related to KDE the bug doesn't occur anymore. So, I guess, great job devs!