From 133e84527fbf94b35a4cfe572fe093e7ab5a7837 Mon Sep 17 00:00:00 2001 From: Jason Paul Date: Thu, 21 Mar 2024 10:44:12 +0000 Subject: [PATCH] refactor: rename of function to be more descriptive --- sn_cli/src/subcommands/files.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sn_cli/src/subcommands/files.rs b/sn_cli/src/subcommands/files.rs index 48ba4202fd..65a4030aad 100644 --- a/sn_cli/src/subcommands/files.rs +++ b/sn_cli/src/subcommands/files.rs @@ -120,7 +120,7 @@ pub(crate) async fn files_cmds( retry_strategy, make_data_public, } => { - if file_count(&file_path) == 0 { + if count_files_in_path_recursively(&file_path) == 0 { if file_path.is_dir() { bail!( "The directory specified for upload is empty. \ @@ -266,7 +266,7 @@ pub(crate) async fn files_cmds( Ok(()) } -fn file_count(file_path: &PathBuf) -> u32 { +fn count_files_in_path_recursively(file_path: &PathBuf) -> u32 { let entries_iterator = WalkDir::new(file_path).into_iter().flatten(); let mut count = 0;