Christian Costa : attrib: Skip processing of . and .. entries.
Alexandre Julliard
julliard at winehq.org
Tue Mar 27 12:48:07 CDT 2012
Module: wine
Branch: master
Commit: a575c6d93a698f558d85f6de298dc24e602e4dfc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a575c6d93a698f558d85f6de298dc24e602e4dfc
Author: Christian Costa <titan.costa at gmail.com>
Date: Mon Mar 26 22:05:45 2012 +0200
attrib: Skip processing of . and .. entries.
---
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-cvs
mailing list