mirror of
https://github.com/xzb23/check_duplicate_files.git
synced 2026-11-25 03:05:25 +08:00
fix: 大小为0的重复文件不会被打印 and
This commit is contained in:
2 files changed
+5
-3
No files matched your search
@@ -38,20 +38,22 @@ def print_info(hash_to_files_list: list = runing_data.hash_to_files):
|
||||
size_if_one = 0
|
||||
print_size_total = 0
|
||||
print_size_if_one = 0
|
||||
count = 0
|
||||
for t in runing_data.hash_to_files:
|
||||
st_size = os.stat(runing_data.hash_to_files[t][0]).st_size
|
||||
size_total += st_size * len(runing_data.hash_to_files[t])
|
||||
size_if_one += st_size
|
||||
if st_size <= config.flag_size:
|
||||
if st_size < config.flag_size:
|
||||
continue
|
||||
print_size_total += st_size * len(runing_data.hash_to_files[t])
|
||||
print_size_if_one += st_size
|
||||
if len(runing_data.hash_to_files[t]) > 1:
|
||||
count += 1
|
||||
print(t, f"size: {st_size} Byte")
|
||||
for fp in runing_data.hash_to_files[t]:
|
||||
print("\t", fp)
|
||||
print()
|
||||
if size_total == size_if_one:
|
||||
if count == 0:
|
||||
print(config.l10n_data.get_text("info_print_info_not_duplicate_msg"))
|
||||
|
||||
size_duplicate = size_total - size_if_one
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
help_fsize = 只打印文件大小大于fsize Byte的重复文件
|
||||
help_fsize = 只打印文件大小不小于fsize Byte的重复文件
|
||||
tip_traverse_dir = 正在遍历文件ing...
|
||||
info_traverse_dir = 完成 总计 {} 个文件
|
||||
tip_hash_files_from_glist = 正在计算文件散列ing...
|
||||
|
||||
Reference in new issue
Block a user