aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/ArchiveInputPlugin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/ArchiveInputPlugin.cxx')
-rw-r--r--src/input/ArchiveInputPlugin.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/input/ArchiveInputPlugin.cxx b/src/input/ArchiveInputPlugin.cxx
index 5288f2b3b..97694fbc0 100644
--- a/src/input/ArchiveInputPlugin.cxx
+++ b/src/input/ArchiveInputPlugin.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -25,11 +25,11 @@
#include "ArchivePlugin.hxx"
#include "ArchiveFile.hxx"
#include "InputPlugin.hxx"
-#include "util/Error.hxx"
#include "fs/Traits.hxx"
+#include "util/Alloc.hxx"
#include "Log.hxx"
-#include <glib.h>
+#include <stdlib.h>
/**
* select correct archive plugin to handle the input stream
@@ -47,16 +47,16 @@ input_archive_open(const char *pathname,
const struct archive_plugin *arplug;
InputStream *is;
- if (!PathTraits::IsAbsoluteFS(pathname))
+ if (!PathTraitsFS::IsAbsolute(pathname))
return nullptr;
- char *pname = g_strdup(pathname);
+ char *pname = strdup(pathname);
// archive_lookup will modify pname when true is returned
const char *archive, *filename, *suffix;
if (!archive_lookup(pname, &archive, &filename, &suffix)) {
FormatDebug(archive_domain,
"not an archive, lookup %s failed", pname);
- g_free(pname);
+ free(pname);
return nullptr;
}
@@ -65,19 +65,19 @@ input_archive_open(const char *pathname,
if (!arplug) {
FormatWarning(archive_domain,
"can't handle archive %s", archive);
- g_free(pname);
+ free(pname);
return nullptr;
}
auto file = archive_file_open(arplug, archive, error);
if (file == nullptr) {
- g_free(pname);
+ free(pname);
return nullptr;
}
//setup fileops
is = file->OpenStream(filename, mutex, cond, error);
- g_free(pname);
+ free(pname);
file->Close();
return is;