Skip to content

Commit

Permalink
Added support to disable validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri6037 committed Dec 8, 2023
1 parent 69a00d7 commit ebd001d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dbg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
bpx = { version = "4.0.0-beta-10.0.0", path = "../../bpx-rs", features = ["package", "shader", "sd-formatting"] }
bpx = { version = "4.0.0-beta-10.0.1", path = "../../bpx-rs", features = ["package", "shader", "sd-formatting"] }
json = "0.12.4"
2 changes: 1 addition & 1 deletion dump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"

[dependencies]
clap = "2.27.0"
bpx = { version = "4.0.0-rc.10.0.0", features = ["sd", "sd-formatting"] }
bpx = { version = "4.0.0-rc.10.0.1", features = ["sd", "sd-formatting"] }

[dev-dependencies]
assert_cmd = "1.0.4"
Expand Down
7 changes: 6 additions & 1 deletion dump/src/bpxinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use bpx::core::{
header::{FLAG_CHECK_CRC32, FLAG_CHECK_WEAK, FLAG_COMPRESS_XZ, FLAG_COMPRESS_ZLIB},
Container
};
use bpx::core::options::OpenOptions;
use bpx::sd::formatting::{Format, IndentType};
use clap::ArgMatches;

Expand Down Expand Up @@ -204,7 +205,11 @@ fn open_section_print<T: Read + Seek, TWrite: Write>(

pub fn run(file: &Path, matches: &ArgMatches) -> Result<()>
{
let mut bpx = Container::open(BufReader::new(File::open(file)?))?;
let options = OpenOptions::new(BufReader::new(File::open(file)?))
.skip_signature(matches.is_present("skip_signature"))
.skip_versions(matches.is_present("skip_version"))
.skip_checksum(matches.is_present("skip_checksum"));
let mut bpx = Container::open(options)?;

print_main_header(&bpx);
if matches.is_present("metadata") {
Expand Down
3 changes: 3 additions & 0 deletions dump/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ fn main()
(@arg section_id: -d --dump +takes_value "Dumps the content of the section identified by the given index")
(@arg out_file: -o --output +takes_value "Save dump output to a file")
(@arg bpxsd: --bpxsd "Parse the section to print (specified in -d) as a BPX Structured Data Object (BPXSD)")
(@arg skip_signature: --skipsignature "Skip file signature verification")
(@arg skip_version: --skipversion "Skip file version verification")
(@arg skip_checksum: --skipchecksum "Skip checksum verifications")
)
.get_matches();
let file = matches.value_of("file").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion package/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"

[dependencies]
clap = "2.27.0"
bpx = { version = "4.0.0-rc.10.0.0", features = ["package"] }
bpx = { version = "4.0.0-rc.10.0.1", features = ["package"] }

[dev-dependencies]
assert_cmd = "1.0.4"
Expand Down

0 comments on commit ebd001d

Please sign in to comment.