Skip to content

Commit

Permalink
cli: Fix md5 subcommand input file parsing (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
astarivi authored Sep 15, 2024
1 parent 9278a07 commit ffa57bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xdvdfs-cli/src/cmd_md5.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use crate::img::open_image;
use clap::Args;
use maybe_async::maybe_async;
use md5::{Digest, Md5};
use std::fs::File;
use std::path::Path;
use xdvdfs::util;

#[derive(Args)]
Expand Down Expand Up @@ -79,7 +80,7 @@ async fn md5_from_root_tree<E>(

#[maybe_async]
pub async fn cmd_md5(args: &Md5Args) -> Result<(), anyhow::Error> {
let mut img = File::options().read(true).open(&args.image_path)?;
let mut img = open_image(Path::new(&args.image_path)).await?;
let volume = xdvdfs::read::read_volume(&mut img).await?;

let result = if let Some(path) = &args.path {
Expand Down

0 comments on commit ffa57bb

Please sign in to comment.