Fix echo bug

Removed the 'recreating hardlinks' echo for inode groups of 1 file.
This commit is contained in:
undaunt 2024-11-06 13:48:53 -08:00 committed by GitHub
parent 3ae15e565a
commit d7c74441a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,13 +165,16 @@ function process_inode_group() {
fi
mv "${tmp_file_path}" "${main_file}"
echo "Recreating hardlinks..."
for (( i=1; i<${#paths[@]}; i++ )); do
if [ "$debug_flag" = true ]; then
echo "Linking ${main_file} to ${paths[$i]}"
fi
ln "${main_file}" "${paths[$i]}"
done
# Only recreate hardlinks if there are multiple paths
if [ "${num_paths}" -gt 1 ]; then
echo "Recreating hardlinks..."
for (( i=1; i<${#paths[@]}; i++ )); do
if [ "$debug_flag" = true ]; then
echo "Linking ${main_file} to ${paths[$i]}"
fi
ln "${main_file}" "${paths[$i]}"
done
fi
if [ "${passes_flag}" -ge 1 ]; then
# Update rebalance "database" for all files