aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfigPath.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-12 10:02:11 +0200
committerMax Kellermann <max@duempel.org>2013-09-12 10:17:41 +0200
commit1ee6a78cb727561e75a5d60135bb0cd7956f70b0 (patch)
tree1b04fc472927341f818d3d571456fb495dd43ece /src/ConfigPath.cxx
parentbf4ee48efad262c650b6b1a5b61ebe837d59f910 (diff)
downloadmpd-1ee6a78cb727561e75a5d60135bb0cd7956f70b0.tar.gz
mpd-1ee6a78cb727561e75a5d60135bb0cd7956f70b0.tar.xz
mpd-1ee6a78cb727561e75a5d60135bb0cd7956f70b0.zip
Path: add FromUTF8() overload that returns an Error
Diffstat (limited to 'src/ConfigPath.cxx')
-rw-r--r--src/ConfigPath.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ConfigPath.cxx b/src/ConfigPath.cxx
index 86f70dfd3..f9236df2a 100644
--- a/src/ConfigPath.cxx
+++ b/src/ConfigPath.cxx
@@ -53,13 +53,9 @@ ParsePath(const char *path, Error &error)
{
assert(path != nullptr);
- Path path2 = Path::FromUTF8(path);
- if (path2.IsNull()) {
- error.Format(path_domain,
- "Failed to convert path to file system charset: %s",
- path);
+ Path path2 = Path::FromUTF8(path, error);
+ if (path2.IsNull())
return Path::Null();
- }
#ifndef WIN32
if (!g_path_is_absolute(path) && path[0] != '~') {