git-svn: Added 'find-rev' command
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index b48e19dc09fff7d7fb1d5b48673fe4448b69a7c3..602282bd1b198a7a0cef0707c738b4eda0d3ccef 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -24,8 +24,9 @@ int common_prefix(const char **pathspec)
        prefix = slash - path + 1;
        while ((next = *++pathspec) != NULL) {
                int len = strlen(next);
-               if (len >= prefix && !memcmp(path, next, len))
+               if (len >= prefix && !memcmp(path, next, prefix))
                        continue;
+               len = prefix - 1;
                for (;;) {
                        if (!len)
                                return 0;