[PATCH 2/6] attrib: Skip processing of . and .. entries.

Christian Costa titan.costa at gmail.com
Mon Mar 26 15:05:45 CDT 2012


---
 programs/attrib/attrib.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c
index 34b8592..865f59c 100644
--- a/programs/attrib/attrib.c
+++ b/programs/attrib/attrib.c
@@ -180,6 +180,12 @@ int wmain(int argc, WCHAR *argv[])
     }
     else {
         do {
+            const WCHAR dot[] = {'.', 0};
+            const WCHAR dotdot[] = {'.', '.', 0};
+
+            if (!strcmpW(fd.cFileName, dot) || !strcmpW(fd.cFileName, dotdot))
+                continue;
+
             if (attrib_set || attrib_clear) {
                 fd.dwFileAttributes &= ~attrib_clear;
                 fd.dwFileAttributes |= attrib_set;




More information about the wine-patches mailing list