input/archive: use g_path_is_absolute()
.. instead of manually checking pathname[0]=='/'. g_path_is_absolute() is portable.
This commit is contained in:
parent
03427d4eff
commit
b12072e6d9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user