dir: Avoid some allocations

If no error is passed, we don't need to do charset conversions.
This commit is contained in:
Matthias Clasen 2024-09-06 10:47:12 -04:00
parent ced5c6d960
commit 5d986fd42a

View File

@ -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;