Skip to content

Commit 8f25be8

Browse files
committed
fix: pass context to rar extraction and simplify sidebar message entry
1 parent 1ee6ab6 commit 8f25be8

3 files changed

Lines changed: 3 additions & 28 deletions

File tree

agent/utils/cmd/cmd_test.go

Lines changed: 0 additions & 23 deletions
This file was deleted.

agent/utils/files/rar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (z RarArchiver) Extract(ctx context.Context, filePath, dstDir string, _ str
2323
if err := checkCmdAvailability("unrar"); err != nil {
2424
return err
2525
}
26-
return cmd.NewCommandMgr().Run("unrar", "x", "-y", "-o+", filePath, dstDir)
26+
return cmd.NewCommandMgr(cmd.WithContext(ctx)).Run("unrar", "x", "-y", "-o+", filePath, dstDir)
2727
}
2828

2929
func (z RarArchiver) Compress(ctx context.Context, sourcePaths []string, dstFile string, _ string) (err error) {

frontend/src/layout/components/Sidebar/components/Collapse.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@
3232
<el-divider class="divider" />
3333

3434
<div class="dropdown-item" @click="openTask">
35-
<div class="node">
36-
<SvgIcon class="icon" iconName="p-renwuzhongxin1" />
37-
{{ $t('menu.msgCenter') }}
38-
</div>
35+
<SvgIcon class="icon" iconName="p-renwuzhongxin1" />
36+
{{ $t('menu.msgCenter') }}
3937
<el-tag class="msg-tag" v-if="taskCount !== 0" size="small" round>{{ taskCount }}</el-tag>
4038
</div>
4139
<el-divider v-if="showNodes()" class="divider" />

0 commit comments

Comments
 (0)