Skip to content

Commit

Permalink
Revert the commit "fix: keybinding cmd split error"
Browse files Browse the repository at this point in the history
This reverts commit b6a01e5.
  • Loading branch information
Decodetalkers authored and deepin-bot[bot] committed Jan 26, 2024
1 parent 44049c1 commit 16ad67d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dde-daemon (6.0.34) unstable; urgency=medium

* revert fix for keybinding for linglong

-- chenhongtao <chenhongtao@deepin.org> Fri, 26 Jan 2024 16:31:11 +0800

dde-daemon (6.0.33) unstable; urgency=medium

* fix: keybinding cmd split error
Expand Down
11 changes: 2 additions & 9 deletions keybinding/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
package keybinding

import (
"fmt"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"time"
Expand Down Expand Up @@ -1139,14 +1139,7 @@ func (m *Manager) execCmd(cmd string, viaStartdde bool) error {

if m.useNewAppManager {
desktopExt := ".desktop"
splitStr := strings.Split(cmd, " ")
if len(splitStr) == 0 {
err := fmt.Errorf("invalid command: %s", splitStr)
return err
}

name := splitStr[len(splitStr)-1]

name := strings.TrimSuffix(filepath.Base(cmd), path.Ext(cmd))
desktopFileName := "daemon-keybinding-" + name + desktopExt

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

0 comments on commit 16ad67d

Please sign in to comment.