[ntdll] Move file attribute logic to new function DIR_get_attributes()

Dan Kegel dank at kegel.com
Sat Sep 12 18:35:38 CDT 2009


This patch gathers up logic that deals with file
attributes into a central function, DIR_get_attributes(),
and also provides a hook DIR_set_attributes(),
for storing attributes, so we can plug in an
actual backend later based on xattr.

The code looks cleaner to my eyes afterwards
and has significantly less duplication,
but should behave exactly the same.

This is a bit different from the code I posted earlier;
following Samba's example, it combines the
fd and filename cases into a single function,
and it provides that function with the whole stat
buffer instead of just the mode, since Samba
has evil plans to store the file creation timestamp
as well, and might need to synthesize that from
the unix timestamps.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skel-2.patch
Type: text/x-patch
Size: 8779 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20090912/852dce89/attachment-0001.bin>


More information about the wine-patches mailing list