diff --git a/src/util/tpax_path_copy.c b/src/util/tpax_path_copy.c index 046ddde..df0e0c0 100644 --- a/src/util/tpax_path_copy.c +++ b/src/util/tpax_path_copy.c @@ -77,6 +77,10 @@ int tpax_util_path_copy( } } + if (dst > dstpath) + if (dst[-1] == '/') + dst--; + if (nwritten) *nwritten = dst - dstpath;