mirror of https://github.com/a2x/cs2-dumper.git
Create output directory if it doesn't exist
This commit is contained in:
parent
715bf64ad3
commit
f3a4d0e758
|
@ -1,3 +1,4 @@
|
|||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
|
@ -73,7 +74,7 @@ fn parse_args() -> ArgMatches {
|
|||
.help("The output directory to write the generated files to.")
|
||||
.long("output")
|
||||
.short('o')
|
||||
.default_value("output"),
|
||||
.default_value("generated"),
|
||||
)
|
||||
.get_matches()
|
||||
}
|
||||
|
@ -112,5 +113,7 @@ fn extract_args(matches: &ArgMatches) -> Result<(Option<String>, ConnectorArgs,
|
|||
.map(PathBuf::from)
|
||||
.unwrap();
|
||||
|
||||
fs::create_dir_all(&output_path)?;
|
||||
|
||||
Ok((conn_name, conn_args, output_path))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue