diff options
author | Max Kellermann <max@duempel.org> | 2009-12-15 21:26:16 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-15 21:26:16 +0100 |
commit | b12072e6d968447a87a7a1605c574b9280810279 (patch) | |
tree | 31a3d09b4e495ff21e3e0b3fb7e9a03417c06ae5 | |
parent | 03427d4effdbea05ad28cd985a1f5d9da2127344 (diff) | |
download | mpd-b12072e6d968447a87a7a1605c574b9280810279.tar.gz mpd-b12072e6d968447a87a7a1605c574b9280810279.tar.xz mpd-b12072e6d968447a87a7a1605c574b9280810279.zip |
input/archive: use g_path_is_absolute()
.. instead of manually checking pathname[0]=='/'.
g_path_is_absolute() is portable.
-rw-r--r-- | src/input/archive_input_plugin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input/archive_input_plugin.c b/src/input/archive_input_plugin.c index 0de715a82..18fa735c2 100644 --- a/src/input/archive_input_plugin.c +++ b/src/input/archive_input_plugin.c @@ -41,7 +41,7 @@ input_archive_open(struct input_stream *is, const char *pathname) char *archive, *filename, *suffix, *pname; bool opened; - if (pathname[0] != '/') + if (!g_path_is_absolute(pathname)) return false; pname = g_strdup(pathname); |