]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-summary.c
ui-snapshot: set unused cgit_filter fields to zero
[ps-cgit] / ui-summary.c
index 5598d0808ae066dd7827d0f6b282caae69394630..63a5a754ba0297e8775c666495a885d942cf1b0e 100644 (file)
@@ -1,7 +1,6 @@
 /* ui-summary.c: functions for generating repo summary page
  *
- * Copyright (C) 2006 Lars Hjemli
- * Copyright (C) 2010-2013 Jason A. Donenfeld <Jason@zx2c4.com>
+ * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
  *
  * Licensed under GNU General Public License v2
  *   (see COPYING for full license text)
@@ -117,7 +116,7 @@ static char* append_readme_path(const char *filename, const char *ref, const cha
        if (!ref) {
                resolved_base = realpath(base_dir, NULL);
                resolved_full = realpath(full_path, NULL);
-               if (!resolved_base || !resolved_full || strncmp(resolved_base, resolved_full, strlen(resolved_base))) {
+               if (!resolved_base || !resolved_full || prefixcmp(resolved_full, resolved_base)) {
                        free(full_path);
                        full_path = NULL;
                }