mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 04:15:23 +03:00
unzip: Create parent directory before extracting files
This commit is contained in:
parent
f25123df66
commit
a87c85f401
Notes:
sideshowbarker
2024-07-17 11:30:06 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/a87c85f401 Pull-request: https://github.com/SerenityOS/serenity/pull/13801 Reviewed-by: https://github.com/linusg
@ -27,6 +27,7 @@ static bool unpack_zip_member(Archive::ZipMember zip_member, bool quiet)
|
||||
outln(" extracting: {}", zip_member.name);
|
||||
return true;
|
||||
}
|
||||
MUST(Core::Directory::create(LexicalPath(zip_member.name).parent(), Core::Directory::CreateDirectories::Yes));
|
||||
auto new_file = Core::File::construct(zip_member.name);
|
||||
if (!new_file->open(Core::OpenMode::WriteOnly)) {
|
||||
warnln("Can't write file {}: {}", zip_member.name, new_file->error_string());
|
||||
|
Loading…
Reference in New Issue
Block a user