mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:34:57 +00:00
LibArchive+Utilities: Stop using DeprecatedString
This also slightly improves error propagation in tar, unzip and zip.
This commit is contained in:
parent
8377adfde0
commit
28c99e7a1f
10 changed files with 57 additions and 57 deletions
|
@ -56,7 +56,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto file = TRY(Core::Stream::File::open(path, Core::Stream::OpenMode::Read));
|
||||
auto file_buffer = TRY(file->read_until_eof());
|
||||
Archive::ZipMember member {};
|
||||
member.name = canonicalized_path;
|
||||
member.name = TRY(String::from_deprecated_string(canonicalized_path));
|
||||
|
||||
auto deflate_buffer = Compress::DeflateCompressor::compress_all(file_buffer);
|
||||
if (deflate_buffer.has_value() && deflate_buffer.value().size() < file_buffer.size()) {
|
||||
|
@ -79,7 +79,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto add_directory = [&](DeprecatedString path, auto handle_directory) -> ErrorOr<void> {
|
||||
auto canonicalized_path = DeprecatedString::formatted("{}/", LexicalPath::canonicalized_path(path));
|
||||
Archive::ZipMember member {};
|
||||
member.name = canonicalized_path;
|
||||
member.name = TRY(String::from_deprecated_string(canonicalized_path));
|
||||
member.compressed_data = {};
|
||||
member.compression_method = Archive::ZipCompressionMethod::Store;
|
||||
member.uncompressed_size = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue