feat: add storage_dir option

feat(cli): store config in userdata folder
This commit is contained in:
ThetaDev 2023-05-08 18:07:18 +02:00
parent f036106a73
commit c688ff74e9
5 changed files with 47 additions and 33 deletions

View file

@ -384,7 +384,11 @@ async fn main() {
let cli = Cli::parse();
let rp = RustyPipe::new();
let mut storage_dir = dirs::data_dir().expect("no data dir");
storage_dir.push("rustypipe");
_ = std::fs::create_dir(&storage_dir);
let rp = RustyPipe::builder().storage_dir(storage_dir).build();
match cli.command {
Commands::Download {