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

--- Comment #8 from Thiago Macieira <thi...@kde.org> ---
(In reply to Harald Sitter from comment #7)
> Thanks.
> 
> With that in mind we cannot really support spaces while also following the
> smb URI format [1]. I suppose we'll just have to deviate a bit iff the
> workgroup name contains a space by using a variant of the notation that
> stuffs the workgroup into the userinfo `smb://work group;@/` and then
> translate that back to an smb URI for libsmbclient again. Means the urls
> wont be portable but at least navigation within our tech works.
> 
> [1] https://www.iana.org/assignments/uri-schemes/prov/smb

You may need the user info for the actual user name that is being used to
search that work group. I would recommend using the path or query component
instead:

smb://userwg;user:password@/browsed_workgroup
smb://userwg;user:password@/?=search=browsed_workgroup

This searches the workgroup named "browsed_workgroup" with the user
"userwg\user".

The query has the added benefit a server inside the workgroup is a proper
sub-URL:

smb://userwg;user:password@server/share/folder/file.txt?search=browsed_workgroup

That is,

  QUrl wg("smb://user@/?search=WG");
  QUrl relative("/share/folder/file.txt");
  qDebug() << wg.resolved(relative);  //
"smb://user@/share/folder/file.txt?search=WG"

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to