dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> bruns wrote in file.cpp:889
> isn't this the same as linkTargetBuffer?

Yes, and in fact linkTargetBuffer is more correct. toLocal8Bit() is incorrect, 
QFile::encodeName/decodeName must be used for QByteArray<->QString conversions 
for filenames.

> bruns wrote in file.cpp:864
> The comment does not solve the issue, neither does it help to clarify 
> anything ...
> 
> `buffersize` has to be larger than buff.st_size, otherwise there is no 
> possibility to diffentiate the 'fits exactly' and 'was truncated' cases, both 
> will return `n == buffersize`.
> 
> the correct fix is to use:
> 
>   // Add one to the size, to be able to detect truncation -
>   // in case n == bufferSize, truncation *may* have occured
>   size_t bufferSize = qBound(lowerLimit, buff.st_size + 1, 1024);

Given that this fix is completely unrelated to this commit, it should rather be 
separated into a different commit...

REPOSITORY
  R241 KIO

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

To: jtamate, dfaure, #frameworks
Cc: bruns, kde-frameworks-devel, michaelh, ngraham

Reply via email to