- User Since
- Dec 23 2016, 9:20 PM (178 w, 2 d)
Wed, May 20
My hands are full at the moment, so I'm unable to finish this for some time. Thank you.
Apr 16 2020
Are you talking about someting like this, @bruns? 512 bytes would be a good buffer size?
Not sure if prealocatting the buffers would be better than making syscals.
Apr 1 2020
qCDebug -> qCWarning
Mar 29 2020
Mar 28 2020
Move away from strcpy =]
Using a STL-style iterator for keyList and qstrcpy and qtrncpy to get each key value.
Mar 18 2020
Tried to make a function to feed m_keyList on BSD, but the result was somewhat ugly.
I don't like to use buffers if I can have typed data, but libc uses buffers, so maybe I was putting the sqare piece on the circle hole.
So, accepted @bruns suggestion about the loop.
Mar 17 2020
Refactored the tests:
Mar 15 2020
Mar 13 2020
As @dfaure suggested, moved the attribute copy logic to a function on file_unix.cpp.
Dec 25 2019
Many thanks to getting this live again, @tmarshall . A year ago my vacations ended and I can't get this ready to ship.
Feb 17 2019
My vacancies ended and I'm making the annual planning for my classes, so I will be busy for at least two weeks, but I plan to work on the subjob bug as soon my schedule allows it.
Feb 3 2019
Can we ship it, or using a subjob on KIO::copy is mandatory here?
Jan 17 2019
I'm not sure why the tests fail, and the tests failing are unrelated to xattrs. I think there is some problem in queuing the subjobs and ensuring they all have finished.
After the copy job is finished, the copyLocalDirectory test can't find the file inside the copied test directory. Manually testing recursive copy I can't find problems, but the autotest fail. So, I think some parts of the copy job are executed after the copyjob finishes if I add a subjob.
As I said, we can use start, instead of exec, to be asynchronous, but using a subjob seems to need some refactor, maybe adding a new state for the xattr subjob.
Jan 14 2019
Use subjobs on file_copy and other small fixes
Jan 8 2019
For some reason the added kio was not included
All use cases working, added a new KIO to copy xattr
Jan 5 2019
Tests refactored, but no multiplatform. Other small fixes.
Jan 3 2019
Tests added, includes and ifdefs reworked
Dec 30 2018
I'm following the pattern in Baloo, that keeps NULL on Mac and *BSD. I don't have any of these systems to test, so I didn't touch it.
Didn't searched yet about compatibility of these functions on libc alternatives. Frameworks officially supports a subset of them I should check?
Bug resolved in a proper way with help of Tomaz Canabrava
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 , 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.
Refactored to a function, works on all use cases. Data corruption remains
Dec 29 2018
Dec 28 2018
There is one use case (copy of dirs with rename, due name conflict) where the patches not work, and I can't test on *BSD or Mac.
Dec 27 2018
Support for preserving xattrs on dirs, bugfix
Tested coping from e to VFAT and btrfs.
Successfully copy/move to and from VFAT, losing the xattrs due to lack of support, but don't crash.
Successfully copy/move to and from btrfs, preserving xattrs.