-rw-r--r-- | cgit.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -43,4 +43,7 @@ static void cgit_print_repo_page(struct cacheitem *item) static void cgit_fill_cache(struct cacheitem *item) { + static char buf[PATH_MAX]; + + getcwd(buf, sizeof(buf)); htmlfd = item->fd; item->st.st_mtime = time(NULL); @@ -49,4 +52,5 @@ static void cgit_fill_cache(struct cacheitem *item) else cgit_print_repolist(item); + chdir(buf); } |