Commit b12072e6 authored by Max Kellermann's avatar Max Kellermann

input/archive: use g_path_is_absolute()

.. instead of manually checking pathname[0]=='/'. g_path_is_absolute() is portable.
parent 03427d4e
...@@ -41,7 +41,7 @@ input_archive_open(struct input_stream *is, const char *pathname) ...@@ -41,7 +41,7 @@ input_archive_open(struct input_stream *is, const char *pathname)
char *archive, *filename, *suffix, *pname; char *archive, *filename, *suffix, *pname;
bool opened; bool opened;
if (pathname[0] != '/') if (!g_path_is_absolute(pathname))
return false; return false;
pname = g_strdup(pathname); pname = g_strdup(pathname);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment