core: fix mkdirs

This commit is contained in:
vvb2060 2025-05-02 19:07:48 +00:00 committed by John Wu
parent 30bd7d6555
commit 86da917174

View File

@ -261,6 +261,11 @@ impl Utf8CStr {
let mut path = cstr::buf::default(); let mut path = cstr::buf::default();
let mut components = self.split('/').filter(|s| !s.is_empty()); let mut components = self.split('/').filter(|s| !s.is_empty());
if self.starts_with('/') {
path.append_path("/");
}
loop { loop {
let Some(s) = components.next() else { let Some(s) = components.next() else {
break; break;