Skip to content

[Bug] delete_path_sync Windows 分支类型不匹配 #369

@TrueNine

Description

@TrueNine

Bug Description

Windows 分支中 fs::metadata(path).map(|resolved| resolved.is_dir()).unwrap_or(false).then(|| ...) 返回的是 Option<Result<()>>,但函数签名要求 io::Result<()>,类型不匹配;且 .then().unwrap_or_else() 链式调用逻辑混乱。

所在文件

sdk/src/infra/file_ops.rs 第 52-58 行

建议修复

重构 Windows 分支为清晰的 if/else 控制流,确保返回类型一致。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglowLow priorityrustRust SDK/CLI/MCP code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions