diff options
author | Max Kellermann <max@duempel.org> | 2013-01-17 00:56:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-17 00:56:57 +0100 |
commit | 2cca3ed6ad118b58365ec2a87e71536f03055cf8 (patch) | |
tree | a511887a2b7a38a98969e04f6501dcbb711f1236 /src/UpdateArchive.cxx | |
parent | 21fe376d1d9ffa6064cf89faab7860d443d9f7fd (diff) | |
download | mpd-path.tar.gz mpd-path.tar.xz mpd-path.zip |
Path: new class "Path" wraps filesystem path stringspath
Diffstat (limited to '')
-rw-r--r-- | src/UpdateArchive.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/UpdateArchive.cxx b/src/UpdateArchive.cxx index 72f7aaf19..c45e1b733 100644 --- a/src/UpdateArchive.cxx +++ b/src/UpdateArchive.cxx @@ -24,6 +24,7 @@ #include "Directory.hxx" #include "song.h" #include "Mapper.hxx" +#include "Path.hxx" extern "C" { #include "archive_list.h" @@ -96,20 +97,19 @@ update_archive_file2(Directory *parent, const char *name, changed since - don't consider updating it */ return; - char *path_fs = map_directory_child_fs(parent, name); + const Path path_fs = map_directory_child_fs(parent, name); /* open archive */ GError *error = NULL; - struct archive_file *file = archive_file_open(plugin, path_fs, &error); + struct archive_file *file = archive_file_open(plugin, path_fs.c_str(), + &error); if (file == NULL) { - g_free(path_fs); g_warning("%s", error->message); g_error_free(error); return; } - g_debug("archive %s opened", path_fs); - g_free(path_fs); + g_debug("archive %s opened", path_fs.c_str()); if (directory == NULL) { g_debug("creating archive directory: %s", name); |