mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
parser: filename can contain "\" separator on Windows
This commit is contained in:
parent
a194c42129
commit
0d739996c6
@ -3728,7 +3728,6 @@ _g_ir_parser_parse_file (GIrParser *parser,
|
|||||||
gchar *buffer;
|
gchar *buffer;
|
||||||
gsize length;
|
gsize length;
|
||||||
GIrModule *module;
|
GIrModule *module;
|
||||||
const char *slash;
|
|
||||||
char *dash;
|
char *dash;
|
||||||
char *namespace;
|
char *namespace;
|
||||||
|
|
||||||
@ -3743,11 +3742,7 @@ _g_ir_parser_parse_file (GIrParser *parser,
|
|||||||
|
|
||||||
g_debug ("[parsing] filename %s", filename);
|
g_debug ("[parsing] filename %s", filename);
|
||||||
|
|
||||||
slash = g_strrstr (filename, "/");
|
namespace = g_path_get_basename (filename);
|
||||||
if (!slash)
|
|
||||||
namespace = g_strdup (filename);
|
|
||||||
else
|
|
||||||
namespace = g_strdup (slash+1);
|
|
||||||
namespace[strlen(namespace)-4] = '\0';
|
namespace[strlen(namespace)-4] = '\0';
|
||||||
|
|
||||||
/* Remove version */
|
/* Remove version */
|
||||||
|
Loading…
Reference in New Issue
Block a user