From 648dd5a3eb3c84fdef63b0b1123303741c17ddee Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sun, 23 Oct 2016 23:43:19 +0100 Subject: [PATCH] Use HasPrefix() instead of strncmp(). --- uip/mhstoresbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 9c38a588..8360eecd 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -674,7 +674,7 @@ got_filename: int cwdlen = strlen (info->cwd); fprintf (stderr, " as file %s\n", - strncmp (ct->c_storage, info->cwd, cwdlen) + !HasPrefix(ct->c_storage, info->cwd) || ct->c_storage[cwdlen] != '/' ? ct->c_storage : ct->c_storage + cwdlen + 1); } -- 2.56.0