canonicalize album path
This commit is contained in:
parent
0d9d632195
commit
b38ad60e15
1 changed files with 2 additions and 3 deletions
|
@ -6,12 +6,11 @@ use std::path::Path;
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
let cli = Cli::parse();
|
let cli = Cli::parse();
|
||||||
// TODO: canonicalize path? To allow ~/foo/bar
|
let album_path = Path::new(&cli.album_path).canonicalize()?;
|
||||||
let album_path = Path::new(&cli.album_path);
|
|
||||||
|
|
||||||
match cli.subcommand {
|
match cli.subcommand {
|
||||||
Commands::Init {} => {
|
Commands::Init {} => {
|
||||||
make_skeleton(album_path)?;
|
make_skeleton(&album_path)?;
|
||||||
println!("Album created in {}", album_path.display());
|
println!("Album created in {}", album_path.display());
|
||||||
}
|
}
|
||||||
Commands::Generate { full } => {
|
Commands::Generate { full } => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue