From 59f03055c5d67d00710fc3fb12f46a5ab32f9bf5 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sat, 30 Jan 2016 21:22:44 +0100 Subject: correctly handle *.files and redirect to pacdbserve --- pacredir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacredir.c b/pacredir.c index 13fbe3c..aeda4d4 100644 --- a/pacredir.c +++ b/pacredir.c @@ -343,7 +343,8 @@ static int ahc_echo(void * cls, } /* process db file request */ - if (strlen(basename) > 3 && strcmp(basename + strlen(basename) - 3, ".db") == 0) { + if ((strlen(basename) > 3 && strcmp(basename + strlen(basename) - 3, ".db") == 0) || + (strlen(basename) > 6 && strcmp(basename + strlen(basename) - 6, ".files") == 0)) { dbfile = 1; /* get timestamp of local file */ filename = malloc(strlen(SYNCPATH) + strlen(basename) + 2); -- cgit v1.2.3-70-g09d2