aboutsummaryrefslogtreecommitdiffstats
path: root/src/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/path.c')
-rw-r--r--src/path.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/path.c b/src/path.c
index 721cb345b..35836ea46 100644
--- a/src/path.c
+++ b/src/path.c
@@ -36,18 +36,11 @@ const char *musicDir;
static const char *playlistDir;
static char *fsCharset = NULL;
-static char *pathConvCharset(char *to, char *from, char *str, char *ret)
-{
- if (ret)
- free(ret);
- return setCharSetConversion(to, from) ? NULL : convStrDup(str);
-}
-
char *fsCharsetToUtf8(char *str)
{
static char *ret = NULL;
- ret = pathConvCharset("UTF-8", fsCharset, str, ret);
+ ret = convCharset("UTF-8", fsCharset, str, ret);
if (ret && !validUtf8String(ret)) {
free(ret);
@@ -61,7 +54,7 @@ char *utf8ToFsCharset(char *str)
{
static char *ret = NULL;
- ret = pathConvCharset(fsCharset, "UTF-8", str, ret);
+ ret = convCharset(fsCharset, "UTF-8", str, ret);
if (!ret)
ret = xstrdup(str);