Fix move duplicate handling with hash verification

This commit is contained in:
Codex
2026-04-18 20:47:35 +08:00
parent 4379c6c995
commit 9d69a4afd1
3 changed files with 600 additions and 17 deletions
+4
View File
@@ -13,12 +13,14 @@ The program supports two rule types at the same time:
Copies or moves files to a `zip` directory
Skips when the `zip` directory already has a file with the same name
Skips when the `unzip` directory already has an extracted folder with the same name
In `move` mode, if the existing archive or extracted folder is verified as the same content, the source file is removed
- Generic file rule
Watches other file types by extension list
Only needs `UNC source path + local target path`
Does not use `unzip`
Supports two dedupe modes
In `move` mode, duplicate files are removed from the source only after hash verification
## Generic File Dedupe
@@ -28,6 +30,7 @@ The generic file rule supports these dedupe modes:
This is the default mode
If the target directory already has a file with the same name and the same size, the file is skipped
If the target directory already has a file with the same name but a different size, it is treated as a conflict and skipped without overwrite
In `move` mode, the program still verifies SHA-256 before deleting the source duplicate
- `Same name and same hash`
When the target directory already has a file with the same name, the program computes SHA-256 for source and target
@@ -112,5 +115,6 @@ When you open the page again, the last saved settings are loaded automatically.
- In `copy` mode, source files remain in the UNC path
- In `move` mode, the program copies first and then removes the source file
- In `move` mode, if a duplicate is detected, the source file is removed only after hash/content verification succeeds
- The generic file rule never overwrites an existing target file when a conflict is detected
- The archive rule only handles `.tar.gz`