From 6afff1fc626904b3036822d571fe0051094d3449 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Mon, 17 Oct 2022 08:51:29 +0300 Subject: Fixed --resolve-symlinks when mountpoint name starts with source dir name. Fixes #122 --- src/misc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/misc.h') diff --git a/src/misc.h b/src/misc.h index 360ddd1..07c0472 100644 --- a/src/misc.h +++ b/src/misc.h @@ -53,6 +53,10 @@ const char *my_basename(const char *path); Otherwise, returns ".". */ const char *my_dirname(char *path); +/* Returns true if the initial path components of 'path' are the path components of 'prefix'. + Assumes 'strlen(prefix) == prefix_len'. */ +bool path_starts_with(const char *path, const char* prefix, size_t prefix_len); + /* Filters arguments in comma-separated lists prefixed by '-o'. * Allocates 'new_argv' and its strings, as well as some temporary data, into 'arena'. */ void filter_o_opts( -- cgit v1.2.3