diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/canon-path.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/canon-path.hh b/src/libutil/canon-path.hh index c5e7f0596..9d5984584 100644 --- a/src/libutil/canon-path.hh +++ b/src/libutil/canon-path.hh @@ -110,7 +110,7 @@ public: std::optional<std::string_view> dirOf() const { if (isRoot()) return std::nullopt; - return path.substr(0, path.rfind('/')); + return ((std::string_view) path).substr(0, path.rfind('/')); } std::optional<std::string_view> baseName() const |