fix: correct saving of custom file paths#1434
Open
nnothing1 wants to merge 3 commits intocloudwego:developfrom
Open
fix: correct saving of custom file paths#1434nnothing1 wants to merge 3 commits intocloudwego:developfrom
nnothing1 wants to merge 3 commits intocloudwego:developfrom
Conversation
HeyJavaBean
approved these changes
Sep 22, 2025
Member
|
lgtm |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1434 +/- ##
===========================================
+ Coverage 74.16% 74.98% +0.82%
===========================================
Files 147 147
Lines 16988 14190 -2798
===========================================
- Hits 12599 10641 -1958
+ Misses 3794 2954 -840
Partials 595 595 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en: In the package template, adding {{.ProjectDir}} introduced absolute paths,
but file generation still used relative paths, which resulted in incorrect
paths like "/path/to/rel/path/to/rel". This change normalizes path handling
during processing to ensure generated file paths are correct.
zh(optional): 在 package 模板中 添加 {{.ProjectDir}} ,会给path带上绝对路径,但是生成文件时又按相对路径生成,从而导致路径不正确(“/path/to/rel/path/to/rel ”绝对路径套绝对路径),因此在 handle 时统一路径格式,确保生成文件路径正确。
(Optional) Which issue(s) this PR fixes:
Fixes #1428
(Optional) The PR that updates user documentation: