Skip to content
Commit 98eac300 authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Use percent encoding when creating urls for UDS entries

Summary:
Otherwise it won't be possible to open gdrive files that contain special
characters (such as `#`) in their path.

This is not handled by libkgapi, which just copies whatever is in the
JSON from Google, and Google does not seem to encode the filenames
either. So we encode the filenames at the kio-gdrive level, where we
actually play with QUrls.

We do so by actually creating a QUrl (which takes care of
percent-encoding in `setPath()`) and then we convert it to a string.

While at it, use faster concatenation rather than arg parsing.

BUG: 395590
FIXED-IN: 1.2.4

Test Plan:
Try to open a file with `#` in the name.
Check whether files with normal names still work.

Reviewers: dvratil, dfaure

Differential Revision: https://phabricator.kde.org/D13691
parent 09b78d92
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment