Skip to content

Commit 3c03b7d

Browse files
authored
Fix/upload artifact error windows (#27802) (#27840)
1 parent ac22116 commit 3c03b7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/api/actions/artifacts_utils.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ func validateArtifactHash(ctx *ArtifactContext, artifactName string) bool {
5858
func parseArtifactItemPath(ctx *ArtifactContext) (string, string, bool) {
5959
// itemPath is generated from upload-artifact action
6060
// it's formatted as {artifact_name}/{artfict_path_in_runner}
61-
itemPath := util.PathJoinRel(ctx.Req.URL.Query().Get("itemPath"))
61+
// act_runner in host mode on Windows, itemPath is joined by Windows slash '\'
62+
itemPath := util.PathJoinRelX(ctx.Req.URL.Query().Get("itemPath"))
6263
artifactName := strings.Split(itemPath, "/")[0]
6364
artifactPath := strings.TrimPrefix(itemPath, artifactName+"/")
6465
if !validateArtifactHash(ctx, artifactName) {

0 commit comments

Comments
 (0)