[kio] [Bug 330015] Remote folder creation via Dolphin smb:/ not working

Frank Reininghaus frank78ac at googlemail.com
Mon Jan 27 15:48:11 GMT 2014


https://bugs.kde.org/show_bug.cgi?id=330015

--- Comment #9 from Frank Reininghaus <frank78ac at googlemail.com> ---
(In reply to comment #8)
> I note that konqueror is not affected.

Konqueror and Dolphin use different approaches to determine if the "Create
New..." action should be enabled if the empty space in the view is clicked:

(a) Konqueror (or to be precise, the DolphinPart which wraps the DolphinView
class and which is shown inside Konqueror) creates a KFileItem for the view's
URL, and then uses the class KFileItemListProperties from kdelibs to find out
if the URL that the KFileItem points to is writable. This happens every time
the context menu is opened.

(b) Dolphin sets the state of the menu to "disabled" when a new URL is loaded,
waits until loading is finished, and then passes the KFileItem which is
returned by the rootItem() method of KDirLister (the interface to the
kioslaves, like kio_file, kio_smb, etc.) to the KFileItemListProperties class
to find out if the URL is writable. Based on the result, the "Create New" menu,
which is used in the context menu, but can also be added to the tool bar, is
enabled or not.

I haven't written any of the relevant code, but it is my understanding that
approach (a) might block the GUI before the context menu is opened if accessing
the URL takes very long. Approach (b) waits until the kioslave (which is an
external process that cannot block the GUI of the application itself) has
investigated the URL and found the necessary information.

Approach (b) has worked fine in Dolphin before 4.12.0, but according to the bug
reports, it seems that kio_smb doesn't provide the "rootItem" any more.

One possibility to work around the problem would be to use (a) as a fall-back
if we don't get a rootItem, see the patch from bug 330001 comment 12 (this bug
is about a non-smb usecase where the same thing happens - mysteriously, it also
started with KDE SC 4.12.x).

If the problem in kio_smb isn't found, then we could use this workaround. But
the problem with workarounds that are applied without having a clue about the
root cause of the bug is that they hide the real bug, and that this bug might
cause more trouble in the future.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list