Skip to content

Commit

Permalink
Fix directory creating.
Browse files Browse the repository at this point in the history
  • Loading branch information
hhandika committed Jan 11, 2024
1 parent 0c92b1f commit cfa675a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handler/sequence/id.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::ffi::OsStr;
use std::fs::{File, OpenOptions};
use std::fs::{self, File, OpenOptions};
use std::io::prelude::*;
use std::io::{BufWriter, Result};
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -31,6 +31,8 @@ impl<'a> Id<'a> {
}

pub fn generate_id(&self, files: &[PathBuf]) {
fs::create_dir_all(self.output.parent().expect("Failed getting parent path"))
.expect("Failed creating output dir");
let spin = utils::set_spinner();
spin.set_message("Indexing IDs..");
let ids = self.get_unique_id(files);
Expand Down

0 comments on commit cfa675a

Please sign in to comment.