D26191: Add support for FileJob->truncate() in smb/sftp slaves

David Faure noreply at phabricator.kde.org
Thu Jan 2 08:50:38 GMT 2020


dfaure accepted this revision.
dfaure added inline comments.

INLINE COMMENTS

> kio_sftp.cpp:1478
> +void sftpProtocol::truncate(KIO::filesize_t length) {
> +    qCDebug(KIO_SFTP_LOG) << "truncate, length = " << length;
> +

[minor: qDebug already appends spaces between arguments, so you get two here after the '=']

> kio_sftp.cpp:1497
> +    if (errorCode) {
> +        errorCode = errorCode == KIO::ERR_INTERNAL ? KIO::ERR_CANNOT_TRUNCATE : errorCode;
> +        error(errorCode, mOpenUrl.path());

self-assignment in some cases is a weird thing to do.
Why not if (errorCode==..) { errorCode = ..; } ?

REPOSITORY
  R320 KIO Extras

REVISION DETAIL
  https://phabricator.kde.org/D26191

To: feverfew, sitter, dfaure, fvogt
Cc: kde-frameworks-devel, kfm-devel, ngraham, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200102/d8969969/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list