aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 19:37:19 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 19:37:19 +0100
commitda693822730d1712d44da85389e4d8b659b3b5df (patch)
treec6af7f8c5eab082cbdab029066b8f8758906d6b3 /src/update.c
parent1a04e571686ea9c9bfca2701564a41f7d9d12a9e (diff)
downloadmpd-da693822730d1712d44da85389e4d8b659b3b5df.tar.gz
mpd-da693822730d1712d44da85389e4d8b659b3b5df.tar.xz
mpd-da693822730d1712d44da85389e4d8b659b3b5df.zip
path: removed pfx_dir()
Use GLib's g_build_filename() instead of pfx_dir().
Diffstat (limited to '')
-rw-r--r--src/update.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/update.c b/src/update.c
index f792b3c3c..7f5185ccb 100644
--- a/src/update.c
+++ b/src/update.c
@@ -288,16 +288,16 @@ make_subdir(struct directory *parent, const char *name)
directory = directory_get_child(parent, name);
if (directory == NULL) {
- char path[MPD_PATH_MAX];
+ char *path;
if (directory_is_root(parent))
- strcpy(path, name);
+ path = NULL;
else
- pfx_dir(path, name, strlen(name),
- directory_get_path(parent),
- strlen(directory_get_path(parent)));
+ name = path = g_strconcat(directory_get_path(parent),
+ "/", name, NULL);
- directory = directory_new_child(parent, path);
+ directory = directory_new_child(parent, name);
+ g_free(path);
}
return directory;