fix: BMP头解析、移动语义与空文件处理

- probe/bmp: 兼容 BITMAPCOREHEADER(12B) 等 info 头变体,按 Size 字段分支解析
- mover: moveOne 返回三态结果,复制成功但删源失败时明确告警,不再静默视为完全成功
- scanner: 跳过 0 字节文件,避免空文件进入 MIME/ffprobe 探测
This commit is contained in:
2025-04-15 21:05:26 +08:00
parent a667f7fa35
commit 7e49accf2b
3 changed files with 52 additions and 22 deletions
+4
View File
@@ -55,6 +55,10 @@ func Scan(opts Options) (*Result, error) {
return nil
}
}
if info.Size() == 0 {
// 空文件不可能是媒体,直接跳过,避免无谓的 MIME/ffprobe 探测
return nil
}
res.Files = append(res.Files, File{
Path: currentPath,
Name: info.Name(),