Skip to content

Commit

Permalink
fix: 归档目录到根目录时,查询制品错误 #9679
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoxuwan committed Nov 14, 2023
1 parent 4fb24b2 commit 47eb0ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

package com.tencent.devops.artifactory.service.impl

import com.tencent.bkrepo.common.api.constant.StringPool
import com.tencent.devops.artifactory.constant.BKREPO_DEFAULT_USER
import com.tencent.devops.artifactory.constant.BKREPO_DEVOPS_PROJECT_ID
import com.tencent.devops.artifactory.constant.BKREPO_STATIC_PROJECT_ID
Expand Down Expand Up @@ -303,7 +304,7 @@ class BkRepoArchiveFileServiceImpl @Autowired constructor(
// 归档插件归档目录时,在目录多归档一个.bkci_pipeline文件, 记录归档目录的信息
return if (nodeInfo.name == ".bkci_pipeline") {
FileInfo(
name = nodeInfo.name,
name = nodeInfo.path.split("/").lastOrNull { it.isNotBlank() } ?: StringPool.ROOT,
fullName = nodeInfo.name,
path = nodeInfo.fullPath,
fullPath = nodeInfo.fullPath,
Expand Down

0 comments on commit 47eb0ba

Please sign in to comment.