package: Suppress version mismatch errors where V1 is supported
* Add flags parameter to Init() of BPackageReader and friends. * Introduce flag B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE and don't print a version mismatch error when given. * package extract/list: Use the new flag.
This commit is contained in:
@@ -166,6 +166,14 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
// Reader Init() flags
|
||||
enum {
|
||||
B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE = 0x01
|
||||
// Fail silently when encountering a package format version mismatch.
|
||||
// Don't print anything to the error output.
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
B_HPKG_COMPRESSION_LEVEL_NONE = 0,
|
||||
B_HPKG_COMPRESSION_LEVEL_FASTEST = 1,
|
||||
|
||||
@@ -31,8 +31,8 @@ public:
|
||||
BPackageReader(BErrorOutput* errorOutput);
|
||||
~BPackageReader();
|
||||
|
||||
status_t Init(const char* fileName);
|
||||
status_t Init(int fd, bool keepFD);
|
||||
status_t Init(const char* fileName, uint32 flags = 0);
|
||||
status_t Init(int fd, bool keepFD, uint32 flags = 0);
|
||||
status_t ParseContent(
|
||||
BPackageContentHandler* contentHandler);
|
||||
status_t ParseContent(BLowLevelPackageContentHandler*
|
||||
|
||||
Reference in New Issue
Block a user