mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +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
|
@ -8,9 +8,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Array.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/IterationDecision.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/Stream.h>
|
||||
#include <string.h>
|
||||
|
@ -238,7 +238,7 @@ struct [[gnu::packed]] LocalFileHeader {
|
|||
};
|
||||
|
||||
struct ZipMember {
|
||||
DeprecatedString name;
|
||||
String name;
|
||||
ReadonlyBytes compressed_data; // TODO: maybe the decompression/compression should be handled by LibArchive instead of the user?
|
||||
ZipCompressionMethod compression_method;
|
||||
u32 uncompressed_size;
|
||||
|
@ -249,7 +249,7 @@ struct ZipMember {
|
|||
class Zip {
|
||||
public:
|
||||
static Optional<Zip> try_create(ReadonlyBytes buffer);
|
||||
bool for_each_member(Function<IterationDecision(ZipMember const&)>);
|
||||
ErrorOr<bool> for_each_member(Function<IterationDecision(ZipMember const&)>);
|
||||
|
||||
private:
|
||||
static bool find_end_of_central_directory_offset(ReadonlyBytes, size_t& offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue