aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-14 22:38:29 +0200
committerMax Kellermann <max@duempel.org>2013-10-14 22:38:29 +0200
commit9508ea982b8feb012a9d354a7c80005421a854bc (patch)
tree4c50648506d2ad1bcc5ebbf93138b62074310840 /src/input
parent47d655ea7f0ed9c26ceba4767ef6aa82e434d129 (diff)
downloadmpd-9508ea982b8feb012a9d354a7c80005421a854bc.tar.gz
mpd-9508ea982b8feb012a9d354a7c80005421a854bc.tar.xz
mpd-9508ea982b8feb012a9d354a7c80005421a854bc.zip
fs/Path: add method IsAbsolute()
Diffstat (limited to 'src/input')
-rw-r--r--src/input/ArchiveInputPlugin.cxx3
-rw-r--r--src/input/FileInputPlugin.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/input/ArchiveInputPlugin.cxx b/src/input/ArchiveInputPlugin.cxx
index 08e1cabfe..bc97ad314 100644
--- a/src/input/ArchiveInputPlugin.cxx
+++ b/src/input/ArchiveInputPlugin.cxx
@@ -26,6 +26,7 @@
#include "InputPlugin.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
+#include "fs/Path.hxx"
#include "Log.hxx"
#include <glib.h>
@@ -49,7 +50,7 @@ input_archive_open(const char *pathname,
char *archive, *filename, *suffix, *pname;
struct input_stream *is;
- if (!g_path_is_absolute(pathname))
+ if (!Path::IsAbsoluteFS(pathname))
return NULL;
pname = g_strdup(pathname);
diff --git a/src/input/FileInputPlugin.cxx b/src/input/FileInputPlugin.cxx
index 75103f711..a8557fc4d 100644
--- a/src/input/FileInputPlugin.cxx
+++ b/src/input/FileInputPlugin.cxx
@@ -24,6 +24,7 @@
#include "InputPlugin.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
+#include "fs/Path.hxx"
#include "system/fd_util.h"
#include "open.h"
@@ -62,7 +63,7 @@ input_file_open(const char *filename,
int fd, ret;
struct stat st;
- if (!g_path_is_absolute(filename))
+ if (!Path::IsAbsoluteFS(filename))
return nullptr;
fd = open_cloexec(filename, O_RDONLY|O_BINARY, 0);