Solve what happens when F4 is pressed to try to edit a remote folder
ClosedPublic

Authored by asensi on Mar 3 2020, 11:14 PM.

Details

Summary

If F4 is pressed to try to edit a remote folder, then an empty file is edited, and an error message is shown. This proposal is aimed to solve that.

Notes: This also happened before applying https://phabricator.kde.org/D27258 ("Manage what happens when a PanelViewerBase (e.g. using Shift+F3) tries to open a nonexistent local file") or applying https://phabricator.kde.org/D27259 ("Manage the use of Shift+F4 when opening a local file that exists, or a remote folder or remote file that exists") though some of the code that was introduced in https://phabricator.kde.org/D27259 was reused in the present code review.

FIXED: [ 418572 ] Errors when pressing F4 on a remote folder
BUG: 418572

Test Plan

Using F4 to try to open a:

  • local file that exists: /etc/passwd
  • local folder that exists: /etc
  • remote folder: smb://user@IP_ADDRESS/PATH/EXISTENT_FOLDER
  • remote folder: fish://user@IP_ADDRESS:PORT/PATH/EXISTENT_FOLDER

Using Shift+F4 to try to open a:

  • local file that exists: /etc/passwd
  • local folder that exists: /etc
  • remote folder: smb://user@IP_ADDRESS/PATH/EXISTENT_FOLDER
  • remote folder: fish://user@IP_ADDRESS:PORT/PATH/EXISTENT_FOLDER

Performing the tests using the default internal editor and also /usr/bin/kate.

Performing the tests using e.g. Kubuntu 18.04 LTS and Kubuntu 19.10.

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asensi requested review of this revision.Mar 3 2020, 11:14 PM
asensi created this revision.
asensi edited the test plan for this revision. (Show Details)Mar 3 2020, 11:17 PM
asensi edited the test plan for this revision. (Show Details)
asensi edited the test plan for this revision. (Show Details)
gengisdave accepted this revision.Mar 10 2020, 2:40 PM
gengisdave added a subscriber: gengisdave.

Work fine, tested locally and with ftp:, fish: and smb: with success.

Thanks!

This revision is now accepted and ready to land.Mar 10 2020, 2:40 PM
asensi edited the summary of this revision. (Show Details)Mar 10 2020, 9:30 PM

All right. Thanks, Davide!

This revision was automatically updated to reflect the committed changes.