diff options
Diffstat (limited to 'include/filepath.h')
-rw-r--r-- | include/filepath.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/filepath.h b/include/filepath.h index 6308f2ae..be148b10 100644 --- a/include/filepath.h +++ b/include/filepath.h @@ -95,8 +95,9 @@ public: // Return `true` if Filepath start with `base`, `false` otherwise. // - // \note `ext` is interpreted as bytes in locale encoding. - bool starts_with(const std::string& base) const; + // Only considers whole path components to match, i.e. "/foo" is **not** + // a prefix of "/foobar/baz". + bool starts_with(const Filepath& base) const; /// Returns the final component of the path, if there is one. nonstd::optional<Filepath> file_name() const; |