Skip to content

Commit

Permalink
fix(hz): pb model_dir corner case (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
FGYFFFF authored Jul 4, 2024
1 parent c562fb6 commit 0b90930
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/hz/protobuf/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ func (plugin *Plugin) fixModelPathAndPackage(pkg string) (impt, path string) {
impt = util.PathToImport(plugin.ModelDir, "") + impt
}
path = util.ImportToPath(impt, "")
impt = plugin.Package + "/" + impt
// bugfix: impt may have "/" suffix
//impt = plugin.Package + "/" + impt
impt = filepath.Join(plugin.Package, impt)
if util.IsWindows() {
impt = util.PathToImport(impt, "")
}
Expand Down

0 comments on commit 0b90930

Please sign in to comment.