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

Juan Lang juan.lang at gmail.com
Mon Sep 14 10:35:52 CDT 2009


Hi Dan,

> 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,

Since you don't actually use the fd in your patch, I think it's
preferred style not to include it for now.

Also,
+void DIR_set_attributes(int fd, DWORD attributes)
+{
+    /* Unimplemented.  Wine does not yet store win32 file attributes. */
(snip)
+
+                    /* Try to save attributes.  We don't care too
much if it doesn't work. */
+                    DIR_set_attributes(fd, info->FileAttributes);

Adding a no-op part of the patch is a bit ugly.  Removing it allows
you to focus on one thing in this patch, rewriting querying the file
attributes.  You re-add setting them later.

(Thanks for working on this, by the way.)
--Juan



More information about the wine-devel mailing list