D11204: Support NTFS hidden files
David Faure
noreply at phabricator.kde.org
Sun Mar 25 10:07:16 BST 2018
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> file_unix.cpp:418
> + constexpr auto attrName = "system.ntfs_attrib_be";
> + const auto filenameEncoded = QFile::encodeName(filename).data();
> + auto length = getxattr(filenameEncoded, attrName, nullptr, 0);
Ouch, you can't call data() here, that's keeping a char* pointing to a deleted (temporary) QByteArray.
The .data() calls need to be inside the getxattr calls themselves (so that filenameEncoded is a QByteArray, which controls the lifetime of the 8bit string).
> rominf wrote in file_unix.cpp:422
> No, it's enough for array length to be `constexpr`.
Hmm, that makes a lot of sense, actually :-)
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D11204
To: rominf, #dolphin, #frameworks, markg, dfaure
Cc: dfaure, markg, elvisangelaccio, ltoscano, anthonyfieroni, broulik, #frameworks, #dolphin, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180325/41b00463/attachment.htm>
More information about the kfm-devel
mailing list