From 77bc1e4361f2f5fe2f94615b675e6c454e6f8748 Mon Sep 17 00:00:00 2001 From: zhuyaliang <15132211195@163.com> Date: Wed, 10 May 2023 15:11:42 +0800 Subject: Fix failure to extract multiple files --- src/glib-utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/glib-utils.c b/src/glib-utils.c index c7cb78c..2ac5670 100644 --- a/src/glib-utils.c +++ b/src/glib-utils.c @@ -510,6 +510,9 @@ _g_path_get_base_name (const char *path, if (junk_paths) return _g_path_get_file_name (path); + if (base_dir == NULL) + return (path[0] == '/') ? path + 1 : path; + base_dir_len = strlen (base_dir); if (strlen (path) < base_dir_len) return NULL; -- cgit v1.2.1