mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
dir: Avoid some allocations
If no error is passed, we don't need to do charset conversions.
This commit is contained in:
parent
ced5c6d960
commit
5d986fd42a
@ -156,7 +156,7 @@ g_dir_open (const gchar *path,
|
||||
|
||||
dir = g_dir_open_with_errno (path, flags);
|
||||
|
||||
if (dir == NULL)
|
||||
if (dir == NULL && error != NULL)
|
||||
{
|
||||
gchar *utf8_path;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user