From a575c6d93a698f558d85f6de298dc24e602e4dfc Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 26 Mar 2012 22:05:45 +0200 Subject: [PATCH] attrib: Skip processing of . and .. entries. --- programs/attrib/attrib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index 34b85921e7..865f59c7d3 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; -- 2.32.0.93.g670b81a890