Try to create the complete path right away and fall back

Robert Nagy requested to merge rnagy/glib:mkdir into master

to creating all path elements one by one.

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 also helps to avoid TOCTOU problems and avoids walking the path all the time, providing a nice performance gain, by avoiding syscalls.

Edited by Jeff Fortin Tam

Merge request reports