aboutsummaryrefslogtreecommitdiff
path: root/src/filepath.cpp
diff options
context:
space:
mode:
authorGravatar Alexander Batischev <eual.jp@gmail.com> 2024-10-01 19:49:16 +0300
committerGravatar Alexander Batischev <eual.jp@gmail.com> 2024-11-22 20:48:31 +0300
commite1ff2e8457269429cf646b51881675ddc087e8ea (patch)
treeb93c7051618ec768c9a1c6691e362b5a91f52b2e /src/filepath.cpp
parent6ef25d77a530eafa3f78de6462ed07093e2e952e (diff)
downloadnewsboat-e1ff2e8457269429cf646b51881675ddc087e8ea.tar.gz
newsboat-e1ff2e8457269429cf646b51881675ddc087e8ea.tar.zst
newsboat-e1ff2e8457269429cf646b51881675ddc087e8ea.zip
Change `Filepath::starts_with()` to take Filepath as argument
This makes more sense, as the argument is a valid path.
Diffstat (limited to 'src/filepath.cpp')
-rw-r--r--src/filepath.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filepath.cpp b/src/filepath.cpp
index b5ff097e..6ff48526 100644
--- a/src/filepath.cpp
+++ b/src/filepath.cpp
@@ -85,9 +85,9 @@ bool Filepath::set_extension(const std::string& ext)
return filepath::bridged::set_extension(*rs_object, string_to_vec(ext));
}
-bool Filepath::starts_with(const std::string& base) const
+bool Filepath::starts_with(const Filepath& base) const
{
- return filepath::bridged::starts_with(*rs_object, string_to_vec(base));
+ return filepath::bridged::starts_with(*rs_object, *base.rs_object);
}
nonstd::optional<Filepath> Filepath::file_name() const