D11204: Support NTFS hidden files
Mark Gaiser
noreply at phabricator.kde.org
Wed Mar 14 16:20:51 GMT 2018
markg added a subscriber: dfaure.
markg added a comment.
@dfaure I've been looking over the file.cpp and file_unix.cpp code a bit and i'm rather surprised that UDS_HIDDEN isn't being set at all here. Which makes me wonder, why is the hidden logic missing and how is it working now?
I don't know for the "why", i'm hoping you can share some insight on this?
I do know for the "how"; "KFileItem::isHidden()" is taking care of that. It checks the first character for a dot and returns true if it does (thus hidden for any app that uses KFileItem).
Would it be OK to move this logic from KFileItem::isHidden to the file.cpp side? Imho, that is the right place to check as operating systems apparently have a different way of showing files as hidden.
Note that this will cause regressions. IOSlaves that don't set UDS_HIDDEN will then show the hidden files. That imho is a bug for those respective IOSlaves not for KFileItem.
INLINE COMMENTS
> file_unix.cpp:546-550
> +#ifdef Q_OS_LINUX
> + if (isNtfsHidden(filename)) {
> + entry.insert(KIO::UDSEntry::UDS_HIDDEN, 1);
> + }
> +#endif
Why here?
This should be done inside the createUDSEntry function (it's in file.cpp).
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D11204
To: rominf, #dolphin, #frameworks, markg
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/20180314/2aab9bbd/attachment.htm>
More information about the kfm-devel
mailing list