D20096: Fill UDSEntry::UDS_CREATION_TIME under linux when glibc >= 2.28

Stefan BrĂ¼ns noreply at phabricator.kde.org
Sat Mar 30 19:24:18 GMT 2019


bruns added inline comments.

INLINE COMMENTS

> file.cpp:880
>      assert(entry.count() == 0); // by contract :-)
> -    entry.reserve(8);
> -
> +    if (details > 0) {
> +        // uid, gid, atime, mtime, btime

`switch (details) { ...}`

> file.cpp:922
>              // Use readlink on Unix because symLinkTarget turns relative targets into absolute (#352927)
> -            const off_t lowerLimit = 1;
> -            const off_t upperLimit = 1024;
> -            size_t bufferSize = qBound(lowerLimit, buff.st_size, upperLimit);
> +            size_t bufferSize = qBound(1, stat_size(buff), 1024);
>              QByteArray linkTargetBuffer;

stat_size + 1. Otherwise, you will always take the `n == bufferSize` path below at least once.

REPOSITORY
  R241 KIO

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

To: meven, #frameworks, dfaure, fvogt, bruns, broulik
Cc: bcooksley, ngraham, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190330/9d2cfc91/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list