Skip to content

Commit 16ad67d

Browse files
Decodetalkersdeepin-bot[bot]
authored andcommitted
Revert the commit "fix: keybinding cmd split error"
This reverts commit b6a01e5.
1 parent 44049c1 commit 16ad67d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
dde-daemon (6.0.34) unstable; urgency=medium
2+
3+
* revert fix for keybinding for linglong
4+
5+
-- chenhongtao <[email protected]> Fri, 26 Jan 2024 16:31:11 +0800
6+
17
dde-daemon (6.0.33) unstable; urgency=medium
28

39
* fix: keybinding cmd split error

keybinding/manager.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
package keybinding
66

77
import (
8-
"fmt"
98
"os"
109
"os/exec"
10+
"path"
1111
"path/filepath"
1212
"strings"
1313
"time"
@@ -1139,14 +1139,7 @@ func (m *Manager) execCmd(cmd string, viaStartdde bool) error {
11391139

11401140
if m.useNewAppManager {
11411141
desktopExt := ".desktop"
1142-
splitStr := strings.Split(cmd, " ")
1143-
if len(splitStr) == 0 {
1144-
err := fmt.Errorf("invalid command: %s", splitStr)
1145-
return err
1146-
}
1147-
1148-
name := splitStr[len(splitStr)-1]
1149-
1142+
name := strings.TrimSuffix(filepath.Base(cmd), path.Ext(cmd))
11501143
desktopFileName := "daemon-keybinding-" + name + desktopExt
11511144

11521145
_, err := os.Stat(basedir.GetUserDataDir() + "/applications/" + desktopFileName)

0 commit comments

Comments
 (0)