Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-ha committed Mar 13, 2024
1 parent 5f24b81 commit d4720d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sleepless/sleepless_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func PreventSleep(appName string, reason string) (func(), error) {
}

var cookie uint
err = conn.BusObject().Call("org.gnome.SessionManager.Inhibit", 0, appName, 0, reason, 0).Store(&cookie)
err = conn.BusObject().Call("org.gnome.SessionManager.Inhibit", 0, appName, uint(0), reason, uint(0)).Store(&cookie)
if err != nil {
return func() {}, err
}
Expand Down
2 changes: 1 addition & 1 deletion state/statemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func InitializeState() (*JcpState, error) {
jcpDir := path.Join(cacheDir, JcpStateDirectoryName)

err = os.Mkdir(jcpDir, os.ModePerm)
if !os.IsExist(err) {
if err != nil && !os.IsExist(err) {
return nil, err
}

Expand Down

0 comments on commit d4720d1

Please sign in to comment.