aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateArchive.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-17 00:56:57 +0100
committerMax Kellermann <max@duempel.org>2013-01-18 15:34:01 +0100
commite5039c478aa93e3e107ee9031a3cf27a6c203fea (patch)
tree5d9fecc644b915fe02634911d65c29123e03c1b8 /src/UpdateArchive.cxx
parent890151450663abd581cab56e853e8e713d822851 (diff)
downloadmpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.tar.gz
mpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.tar.xz
mpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.zip
Path: new class "Path" wraps filesystem path strings
Diffstat (limited to 'src/UpdateArchive.cxx')
-rw-r--r--src/UpdateArchive.cxx10
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);