Bug 393320 - Editing a local path in Bookmark Manager breaks a bookmark
Summary: Editing a local path in Bookmark Manager breaks a bookmark
Status: CONFIRMED
Alias: None
Product: frameworks-kbookmarks
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.67.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: reproducible, triaged
: 418349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-20 07:34 UTC by Nikita Melnichenko
Modified: 2020-07-27 21:21 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Melnichenko 2018-04-20 07:34:59 UTC
1. Open Bookmark Manager.
2. Edit a bookmark with local path - specify another local path.
3. Close Bookmark Manager.
4. Try using the bookmark - you'll see an error message about unsupported protocol.

Reason: Bookmark Manager now creates
<bookmark ... href="/path/to/file">
instead of
<bookmark ... href="file:///path/to/file">

Workaround: specify the location in the form of file:///path/to/file in Bookmark Manager
Comment 1 Martin Kostolný 2018-04-24 16:47:48 UTC
I'm confirming. Actually with my current KIO version (git) using such bookmark crashes Krusader. But I remember that it was producing mentioned error about unsupported protocol before. I'll check changes in KIO and report the crashing there.
Comment 2 Nikita Melnichenko 2018-05-20 04:40:00 UTC
Thanks Martin! Did you have a chance to file a KIO bug? If so, please specify it in the "Depends on" field.
Comment 3 Martin Kostolný 2018-05-20 16:50:28 UTC
Sorry, I forgot about it. Now I've found the change in KIO which is causing the crash. Q_ASSERT for emptiness of protocol was added and briefly discussed here:
https://phabricator.kde.org/D11013

IMO it makes sense that caller with empty protocol (Krusader in this case) is the one that need to be fixed instead informing user of an incorrect URL which regular user is not able to fix anyway.

KIO change only made this bug (393320) more important to fix now:).
Comment 4 Davide Gianforte 2020-03-09 06:34:55 UTC
*** Bug 418349 has been marked as a duplicate of this bug. ***
Comment 5 Davide Gianforte 2020-03-09 07:14:03 UTC
Moving to KBookmark: I can replicate this behaviour on other applications, like Dolphin or KRDC. Local paths (file:///) can be added, but after editing them the protocol is lost. Also, when editing a location, there is no suggestion for local paths.

If this "bug" could not be resolved in KBookMark, a solution would be to validate the path inside the application.
Comment 6 kdebug 2020-05-04 12:30:24 UTC
indeed, ideally the file:///  stuff should not disappear!
Comment 7 Toni Asensi Esteve 2020-07-27 21:21:16 UTC
A note for Krusader developers: If this bug is solved, then the 0f153592 commit (which could be seen in https://commits.kde.org/krusader/0f153592) should be undone in the source code of Krusader (because it was aimed to avoid that Krusader users see the effects of the bug).