Skip to content

Commit

Permalink
refactor: rename of function to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonPaulGithub authored and joshuef committed Mar 22, 2024
1 parent cce71d2 commit 133e845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sn_cli/src/subcommands/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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. \
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 133e845

Please sign in to comment.