extract: handle leading '/' in 'create_directories()'

Fixes #4690
This commit is contained in:
Christian Prochaska 2022-11-22 16:17:02 +01:00 committed by Christian Helmuth
parent a91467f3a8
commit ffb48ed030

View File

@ -54,6 +54,10 @@ bool create_directories(Genode::String<N> const &path)
if (!end_of_elem && !end_of_path)
continue;
/* handle leading '/' */
if (end_of_elem && (sub_path_len == 0))
continue;
Genode::String<N> sub_path(Genode::Cstring(path.string(), sub_path_len));
/* create directory for sub path if it does not already exist */