bruns created this revision. bruns added reviewers: Dolphin, dfaure. Herald added a project: Frameworks. Herald edited subscribers, added: kde-frameworks-devel; removed: Frameworks. bruns requested review of this revision.
REVISION SUMMARY The attrib is a DWORD (32 bit unsigned int) in the Windows APIs (see WIN32_FILE_ATTRIBUTE_DATA), and exported as a 4 byte array by ntfs-3g. As the size is known, there is no need to query it. As each file has the "archive" flag set on creation, i.e. the first getxattr call typically never returns 0, this cuts the number of syscalls by half. Skip the temporary hex encoding of the value, it is pointless to hex- encode the value and immediately after parse it again. TEST PLAN 1. touch foo 2. getfattr -n system.ntfs_attrib_be -e hex foo 3. dolphin ./ 4. setfattr -n system.ntfs_attrib_be -v 0x00000022 5. refresh dolphin REPOSITORY R241 KIO BRANCH ntfs_hidden REVISION DETAIL https://phabricator.kde.org/D28195 AFFECTED FILES src/ioslaves/file/file_unix.cpp To: bruns, #dolphin, dfaure Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns