cochise updated this revision to Diff 48384.
cochise added a comment.

  As using qDebug supressed the error, I changed to qCWarning and managed to 
track the memory corruption. On my system, after getting the list of keys on 
source file, the local variable holding this file path gets corrupted. I'm 
using a code almost identical to official example [1], and enlarging the 
buffer, or allocating it on the heap didn't resoled the issue.
  A hackish workaround is to not store the file path after conversion (`const 
char*`), and using `QUrl.path().toLocal8Bit().data();` in all nine calls.
  I'm not happy with this solution, but I think I reached my limit here. 
Commiting this hackish version for review, and going to make some tests.
  
  1 - http://man7.org/linux/man-pages/man2/listxattr.2.html

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17816?vs=48380&id=48384

BRANCH
  xattr-copy-support (branched from master)

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

AFFECTED FILES
  src/core/config-kiocore.h.cmake
  src/core/copyjob.cpp
  src/ioslaves/file/file_unix.cpp

To: cochise, dfaure
Cc: davidedmundson, ngraham, atha.kane, spoorun, nicolasfella, 
kde-frameworks-devel, michaelh, bruns

Reply via email to