Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/uu/install/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ pub fn uu_app() -> Command {
.action(ArgAction::SetTrue),
)
.arg(
// TODO implement flag
Arg::new(OPT_CREATE_LEADING)
.short('D')
.help(
Expand Down Expand Up @@ -274,7 +273,6 @@ pub fn uu_app() -> Command {
)
.arg(backup_control::arguments::suffix())
.arg(
// TODO implement flag
Arg::new(OPT_TARGET_DIRECTORY)
.short('t')
.long(OPT_TARGET_DIRECTORY)
Expand Down Expand Up @@ -732,12 +730,9 @@ fn perform_backup(to: &Path, b: &Behavior) -> UResult<Option<PathBuf>> {
}
let backup_path = backup_control::get_backup_path(b.backup_mode, to, &b.suffix);
if let Some(ref backup_path) = backup_path {
// TODO!!
if let Err(err) = fs::rename(to, backup_path) {
return Err(
InstallError::BackupFailed(to.to_path_buf(), backup_path.clone(), err).into(),
);
}
fs::rename(to, backup_path).map_err(|err| {
InstallError::BackupFailed(to.to_path_buf(), backup_path.clone(), err)
})?;
}
Ok(backup_path)
} else {
Expand Down
Loading