refactor: rename "resolve_path" method

This commit is contained in:
Talison Fabio 2025-03-22 22:46:26 -03:00
parent cede4b2624
commit 022e9f0883
2 changed files with 2 additions and 2 deletions

View File

@ -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(())),
};

View File

@ -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<Option<PathBuf>> {
pub fn resolve_path_conflict(path: &Path, question_policy: QuestionPolicy) -> crate::Result<Option<PathBuf>> {
if path.exists() {
match user_wants_to_overwrite(path, question_policy)? {
FileConflitOperation::Cancel => Ok(None),