mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 10:26:16 +01:00
gfileutils: Fix error propagation for other than ENOENT
Commit 6f55306e04
unintendedly broke error handling for other
error conditions than ENOENT along the path, like EPERM. It wanted
to ignore ENOENT on all elements except the last in the path, but
in doing that it ignored any other error that might happen on the
last element.
https://gitlab.gnome.org/GNOME/glib/issues/1852
This commit is contained in:
parent
179fdc5239
commit
3a4a665083
@ -262,7 +262,7 @@ g_mkdir_with_parents (const gchar *pathname,
|
|||||||
if (g_mkdir (fn, mode) == -1 && errno != EEXIST)
|
if (g_mkdir (fn, mode) == -1 && errno != EEXIST)
|
||||||
{
|
{
|
||||||
int errno_save = errno;
|
int errno_save = errno;
|
||||||
if (p && errno != ENOENT)
|
if (errno != ENOENT || !p)
|
||||||
{
|
{
|
||||||
g_free (fn);
|
g_free (fn);
|
||||||
errno = errno_save;
|
errno = errno_save;
|
||||||
|
Loading…
Reference in New Issue
Block a user