D17816: Support for xattrs on kio copy/move

Stefan BrĂ¼ns noreply at phabricator.kde.org
Wed Jun 3 00:13:13 BST 2020


bruns added inline comments.

INLINE COMMENTS

> file_unix.cpp:142
> +    ssize_t listlen = 0;
> +    QByteArray keylist(listlen, Qt::Uninitialized);
> +    do {

just `QByteArray keylist;`

> file_unix.cpp:143
> +    QByteArray keylist(listlen, Qt::Uninitialized);
> +    do {
> +        keylist.resize(listlen);

`while (true)` instead of `do {} while(true)`

> file_unix.cpp:164
> +            if (errno == ENOTSUP) {
> +                qCDebug(KIO_FILE) << "source filesystem don't support xattrs";
> +            }

"does not"

> file_unix.cpp:175
> +    keylist.resize(listlen);
> +    keylist.squeeze();
> +

why `.squeeze()` ?

> file_unix.cpp:177
> +
> +    // Linux and MacOS return = list of null terminated string, each string = [data,'\0']
> +    // BSD return = list of items, each item prepended of 1 byte size = [size, data]

"return a list of null terminated strings"

> file_unix.cpp:178
> +    // Linux and MacOS return = list of null terminated string, each string = [data,'\0']
> +    // BSD return = list of items, each item prepended of 1 byte size = [size, data]
> +    QByteArray::const_iterator keyPtr = keylist.cbegin();

"BSDs return a list of items, ..." or "BSD returns a list of items, ..."
"..., each item consisting of the size byte prepended to the key."

> file_unix.cpp:185
> +    while (keyPtr != keylist.cend()) {
> +        // Get the size of key
> +#if HAVE_SYS_XATTR_H

"key size" or "size of the key"

> file_unix.cpp:226
> +        if (destlen == -1 && errno == ENOTSUP) {
> +            qCDebug(KIO_FILE) << "Destination filesystem don't support xattrs";
> +            return false;

"does not"

REPOSITORY
  R241 KIO

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

To: arrowd, dfaure, chinmoyr, bruns, #frameworks, tmarshall, usta, cochise
Cc: usta, scheirle, tmarshall, arrowd, cfeck, bruns, phidrho, dhaumann, funkybomber, abika, pino, davidedmundson, ngraham, atha.kane, spoorun, nicolasfella, kde-frameworks-devel, LeGast00n, cblack, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200602/9520664c/attachment.htm>


More information about the Kde-frameworks-devel mailing list