summaryrefslogtreecommitdiffabout
path: root/cgit.c
Side-by-side diff
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index eff5b7a..4f2c752 100644
--- a/cgit.c
+++ b/cgit.c
@@ -3,2 +3,3 @@
* Copyright (C) 2006 Lars Hjemli
+ * Copyright (C) 2010 Jason A. Donenfeld <Jason@zx2c4.com>
*
@@ -73,3 +74,4 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
else if (!strcmp(name, "readme") && value != NULL) {
- if (*value == '/')
+ char *colon;
+ if (*value == '/' || ((colon = strchr(value, ':')) != NULL && colon != value && *(colon + 1) != '\0'))
repo->readme = xstrdup(value);