Skip to content
Snippets Groups Projects
Commit d0d2f2a5 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

wplua: use only the basename of the files for debug/error messages

parent 067da200
No related branches found
No related tags found
No related merge requests found
......@@ -217,6 +217,7 @@ wplua_load_uri (lua_State * L, const gchar *uri, GError **error)
g_autoptr (GFile) file = NULL;
g_autoptr (GBytes) bytes = NULL;
g_autoptr (GError) err = NULL;
g_autofree gchar *name = NULL;
gconstpointer data;
gsize size;
......@@ -230,8 +231,9 @@ wplua_load_uri (lua_State * L, const gchar *uri, GError **error)
return FALSE;
}
name = g_path_get_basename (uri);
data = g_bytes_get_data (bytes, &size);
return _wplua_load_buffer (L, data, size, uri, error);
return _wplua_load_buffer (L, data, size, name, error);
}
gboolean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment