chore: config变更,及匹配模式优化
This commit is contained in:
@@ -335,10 +335,10 @@ scan_directory() {
|
||||
# 获取文件信息
|
||||
local file_info
|
||||
if file_info=$(get_file_info "$file_path" 2>/dev/null); then
|
||||
# 检查是否应该包含
|
||||
if should_include_file "$file_path" "$file_info"; then
|
||||
# 检查是否应该包含该文件
|
||||
local relative_path="${file_path#$base_dir/}" # 这里一定要使用相对路径,方便在config中配置匹配模式
|
||||
if should_include_file "$relative_path" "$file_info"; then
|
||||
local file_hash=$(get_file_hash "$file_path" "$HASH_ALGORITHM")
|
||||
local relative_path="${file_path#$base_dir/}"
|
||||
|
||||
echo "$relative_path|$file_info|$file_hash" >> "$output_file"
|
||||
((file_count++))
|
||||
|
||||
Reference in New Issue
Block a user