From e9f98a16d7b46332ec4986d890c5d2e26f081cc7 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 10 Oct 2019 18:08:36 +0000 Subject: Fix path_canonicalize()'s returned length when absolute --- src/libstddjb/path_canonicalize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libstddjb/path_canonicalize.c b/src/libstddjb/path_canonicalize.c index c30f9f4..8dec829 100644 --- a/src/libstddjb/path_canonicalize.c +++ b/src/libstddjb/path_canonicalize.c @@ -65,5 +65,5 @@ size_t path_canonicalize (char *out, char const *in, int check) if (j && out[j-1] == '/') j-- ; if (!j && !isabsolute) out[j++] = '.' ; out[j] = 0 ; - return j ; + return j + isabsolute ; } -- cgit v1.2.3