From 022e9f088318f592ffb98555417988080b9732e7 Mon Sep 17 00:00:00 2001 From: Talison Fabio <54823205+talis-fb@users.noreply.github.com> Date: Sat, 22 Mar 2025 22:46:26 -0300 Subject: [PATCH] refactor: rename "resolve_path" method --- src/commands/decompress.rs | 2 +- src/utils/fs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/decompress.rs b/src/commands/decompress.rs index bdcec28..b14dc3c 100644 --- a/src/commands/decompress.rs +++ b/src/commands/decompress.rs @@ -325,7 +325,7 @@ fn smart_unpack( // Before moving, need to check if a file with the same name already exists // If it does, need to ask the user what to do - new_path = match utils::resolve_path(&new_path, question_policy)? { + new_path = match utils::resolve_path_conflict(&new_path, question_policy)? { Some(path) => path, None => return Ok(ControlFlow::Break(())), }; diff --git a/src/utils/fs.rs b/src/utils/fs.rs index 420b945..bb6a88d 100644 --- a/src/utils/fs.rs +++ b/src/utils/fs.rs @@ -20,7 +20,7 @@ pub fn is_path_stdin(path: &Path) -> bool { } /// Check if &Path exists, if it does then ask the user if they want to overwrite or rename it -pub fn resolve_path(path: &Path, question_policy: QuestionPolicy) -> crate::Result> { +pub fn resolve_path_conflict(path: &Path, question_policy: QuestionPolicy) -> crate::Result> { if path.exists() { match user_wants_to_overwrite(path, question_policy)? { FileConflitOperation::Cancel => Ok(None),