mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 16:36:14 +01:00
gfileutils: Ignore ENOENT from all except the last element
Ignore ENOENT errors up until the last element while trying to create each of the path elements in case a restricted file-system is being used where path elements can be hidden or non-accessible.
This commit is contained in:
parent
b482a5c1a9
commit
6f55306e04
@ -248,11 +248,14 @@ g_mkdir_with_parents (const gchar *pathname,
|
||||
if (g_mkdir (fn, mode) == -1 && errno != EEXIST)
|
||||
{
|
||||
int errno_save = errno;
|
||||
if (p && errno != ENOENT)
|
||||
{
|
||||
g_free (fn);
|
||||
errno = errno_save;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!g_file_test (fn, G_FILE_TEST_IS_DIR))
|
||||
{
|
||||
g_free (fn);
|
||||
|
Loading…
Reference in New Issue
Block a user