diff options
Diffstat (limited to 'src/commands/bulk_rename.rs')
-rw-r--r-- | src/commands/bulk_rename.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/bulk_rename.rs b/src/commands/bulk_rename.rs index 4171b01..1b1ffb4 100644 --- a/src/commands/bulk_rename.rs +++ b/src/commands/bulk_rename.rs @@ -30,7 +30,7 @@ pub fn _bulk_rename(context: &mut JoshutoContext) -> JoshutoResult<()> { rand::thread_rng() .sample_iter(&rand::distributions::Alphanumeric) .take(10) - .for_each(|ch| rand_str.push(ch)); + .for_each(|ch| rand_str.push(ch as char)); /* create this file in a temporary folder */ let mut file_path = path::PathBuf::from("/tmp"); @@ -43,6 +43,7 @@ pub fn _bulk_rename(context: &mut JoshutoContext) -> JoshutoResult<()> { None => vec![], } }; + { let mut file = std::fs::File::create(&file_path)?; for path in paths.iter() { |