[GFX-724] fix(runtime): PathHelper.Combine 绝对路径段正确追加分隔符 - #15
Conversation
删除非末段拼接时 StartsWith(分隔符) 的跳过分支:以 / 开头且不以 分隔符结尾的绝对路径段(如 /Users/xxx/cache)不再与后段粘连;纯 / 段与尾分隔符段行为不变(EndsWith 判定覆盖)。补 7 个 Combine 回归 用例(对照 GameFrameX.Godot 2513f60 用例语义)。 Linear: GFX-724
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
Changes路径拼接行为
Estimated code review effort: 2 (简单) | ~10 分钟 Merge Risk: ⚪ Minimal · up to This change fixes absolute-path joining so subsequent path segments are separated correctly while preserving existing trailing-separator behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Runtime/Helper/PathHelper.cs中Combine非末段拼接的StartsWithFast(separator)跳过分支:以/开头且不以分隔符结尾的绝对路径段不再与后段粘连(/Users/blank/cache+img.png旧产出/Users/blank/cacheimg.png)/段、尾/、尾\段行为不变(仍由EndsWith判定覆盖);对外 API 签名不变Tests/UtilityPathTests.cs新增#region PathHelper.Combine七个回归用例(对照 GameFrameX.Godot 2513f60 用例语义)Test plan
projectDir.Parent.FullName绝对路径段的同款粘连)Linear: GFX-724
Summary by CodeRabbit
Bug Fixes
Tests