diff options
Diffstat (limited to '')
-rw-r--r-- | src/fs/Path.hxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/fs/Path.hxx b/src/fs/Path.hxx index 24f1d5e19..926b6eafb 100644 --- a/src/fs/Path.hxx +++ b/src/fs/Path.hxx @@ -26,6 +26,7 @@ #include <glib.h> #include <algorithm> +#include <string> #include <assert.h> #include <string.h> @@ -250,15 +251,11 @@ public: } /** - * Convert the path to UTF-8. The caller is responsible for - * freeing the return value with g_free(). Returns nullptr on - * error. + * Convert the path to UTF-8. + * Returns empty string on error or if this instance is "nulled" + * (#IsNull returns true). */ - char *ToUTF8() const { - return value != nullptr - ? fs_charset_to_utf8(value) - : nullptr; - } + std::string ToUTF8() const; }; #endif |