Merge branch 'wip/carlosg/fix-mkdir-with-parents-errors' into 'master'

gfileutils: Fix error propagation for other than ENOENT

See merge request GNOME/glib!1027
This commit is contained in:
Simon McVittie 2019-08-12 08:01:59 +00:00
commit 870b30bd7c

View File

@ -262,7 +262,7 @@ g_mkdir_with_parents (const gchar *pathname,
if (g_mkdir (fn, mode) == -1 && errno != EEXIST)
{
int errno_save = errno;
if (p && errno != ENOENT)
if (errno != ENOENT || !p)
{
g_free (fn);
errno = errno_save;