D16770: [ftp kio-slave] Fix deletion of directory with non-latin1/utf8 parent path
David Faure
noreply at phabricator.kde.org
Sat Nov 10 21:44:57 GMT 2018
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> ftp.cpp:1240
> if (!isfile) {
> - ftpFolder(remoteEncoding()->directory(url), false); // ignore errors
> + const QString parentDir = remoteEncoding()->decode(remoteEncoding()->directory(url));
> + ftpFolder(parentDir, false); // ignore errors
directory() encodes, and then you call decode(). Sounds slow and convoluted.
I would write it like this instead:
const QString parentDir = url.adjusted(QUrl::StripTrailingSlash).adjusted(QUrl::RemoveFilename).path();
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D16770
To: kossebau, dfaure
Cc: aacid, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181110/d910b686/attachment.html>
More information about the Kde-frameworks-devel
mailing list