From 079b6a1e5997fd0f42fe824b0e02861b78c6e9c6 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 9 Apr 2009 18:07:15 +0200 Subject: [PATCH] filevercmp: fix regression --- lib/filevercmp.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/lib/filevercmp.c b/lib/filevercmp.c index caa4891..20522d1 100644 --- a/lib/filevercmp.c +++ b/lib/filevercmp.c @@ -149,6 +149,17 @@ filevercmp (const char *s1, const char *s2) if (0 == strcmp ("..", s2)) return 1; + /* special handle for other hidden files */ + if (*s1 == '.' && *s2 != '.') + return -1; + if (*s1 != '.' && *s2 == '.') + return 1; + if (*s1 == '.' && *s2 == '.') + { + s1++; + s2++; + } + /* "cut" file suffixes */ s1_pos = s1; s2_pos = s2; -- 1.6.2.2