diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-03-11 20:33:36 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-03-11 21:35:23 -0400 |
commit | 5c6b1e53e4ebbe65e4299633659b28ff72ef6b56 (patch) | |
tree | e7d554ba93c250ec458460de475162c5a540897c /src/commands | |
parent | d9a4d91a6b00691d4b363edeb2623ccc8d1f1d55 (diff) |
fix rename file and textfield home
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/rename_file.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/rename_file.rs b/src/commands/rename_file.rs index 23ae1fd..5078680 100644 --- a/src/commands/rename_file.rs +++ b/src/commands/rename_file.rs @@ -83,8 +83,8 @@ impl RenameFileAppend { let prefix; let suffix; if let Some(ext) = file_name.rfind('.') { - prefix = format!("rename {}", &file_name[0..ext + 1]); - suffix = String::from(&file_name[ext + 1..]); + prefix = format!("rename {}", &file_name[0..ext]); + suffix = String::from(&file_name[ext..]); } else { prefix = format!("rename {}", file_name); suffix = String::new(); |