[2/2] ntdll: Implement FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM support (take 6)

Dan Kegel dank at kegel.com
Wed Oct 7 11:46:19 CDT 2009


On Wed, Oct 7, 2009 at 9:21 AM, Ken Thomases <ken at codeweavers.com> wrote:
> Tangentially related to this xattr issue, are you aware of BSD's chflags
> system call and the st_flags field of struct stat?  On Mac OS X (and any
> other BSD which defines UF_HIDDEN), FILE_ATTRIBUTE_HIDDEN is better
> implemented by checking for UF_HIDDEN in the st_flags field.  This will then
> actually integrate with the native API's and GUI's notion of hidden files.

Golly.  No, wasn't aware of that, thanks.

> Similarly, FILE_ATTRIBUTE_ARCHIVE corresponds to the _lack_ of UF_NODUMP and
> SF_ARCHIVED.  (We should check the SF_ flag, but we can only expect to be
> able to set/clear the UF_ flag.)

I'd rather wait on that flag, it's less pressing.

> It would also be good to check for UF_IMMUTABLE|SF_IMMUTABLE to determine
> FILE_ATTRIBUTE_READONLY, and set UF_IMMUTABLE when setting
> FILE_ATTRIBUTE_READONLY, although that's a bit of a digression from what
> you're directly working on in your patches.

Why isn't readonly enough?  Geez.

> The version of Samba for Mac OS X is patched to work with these flags:
>
> http://www.opensource.apple.com/source/samba/samba-235/patches/support-stflags-stat-field-rdonly
> http://www.opensource.apple.com/source/samba/samba-235/patches/support-stflags-stat-field-rw

Thanks for the pointers!
- Dan



More information about the wine-devel mailing list