fix: BMP头解析、移动语义与空文件处理
- probe/bmp: 兼容 BITMAPCOREHEADER(12B) 等 info 头变体,按 Size 字段分支解析 - mover: moveOne 返回三态结果,复制成功但删源失败时明确告警,不再静默视为完全成功 - scanner: 跳过 0 字节文件,避免空文件进入 MIME/ffprobe 探测
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user