Option: prompt user when about to replace an existing file caused by a file transfer

This commit is contained in:
veeso
2021-09-18 15:57:05 +02:00
parent 63e7023342
commit 06ffbaa2f4
17 changed files with 406 additions and 33 deletions

View File

@@ -201,6 +201,7 @@ mod tests {
assert_eq!(cfg.user_interface.text_editor, PathBuf::from("vim"));
assert_eq!(cfg.user_interface.show_hidden_files, true);
assert_eq!(cfg.user_interface.check_for_updates.unwrap(), true);
assert_eq!(cfg.user_interface.prompt_on_file_replace.unwrap(), false);
assert_eq!(cfg.user_interface.group_dirs, Some(String::from("last")));
assert_eq!(
cfg.user_interface.file_fmt,
@@ -244,6 +245,7 @@ mod tests {
assert_eq!(cfg.user_interface.show_hidden_files, true);
assert_eq!(cfg.user_interface.group_dirs, None);
assert!(cfg.user_interface.check_for_updates.is_none());
assert!(cfg.user_interface.prompt_on_file_replace.is_none());
assert!(cfg.user_interface.file_fmt.is_none());
assert!(cfg.user_interface.remote_file_fmt.is_none());
// Verify keys
@@ -317,6 +319,7 @@ mod tests {
text_editor = "vim"
show_hidden_files = true
check_for_updates = true
prompt_on_file_replace = false
group_dirs = "last"
file_fmt = "{NAME} {PEX}"
remote_file_fmt = "{NAME} {USER}"