aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipc')
-rw-r--r--lib/ipc/receive.go5
-rw-r--r--lib/ipc/send.go5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/ipc/receive.go b/lib/ipc/receive.go
index 12df3411..29ed0808 100644
--- a/lib/ipc/receive.go
+++ b/lib/ipc/receive.go
@@ -6,14 +6,13 @@ import (
"net"
"net/url"
"os"
- "path"
"strings"
"sync/atomic"
"time"
"git.sr.ht/~rjarry/aerc/config"
+ "git.sr.ht/~rjarry/aerc/lib/xdg"
"git.sr.ht/~rjarry/aerc/log"
- "github.com/kyoh86/xdg"
)
type AercServer struct {
@@ -22,7 +21,7 @@ type AercServer struct {
}
func StartServer(handler Handler) (*AercServer, error) {
- sockpath := path.Join(xdg.RuntimeDir(), "aerc.sock")
+ sockpath := xdg.RuntimePath("aerc.sock")
// remove the socket if it is not connected to a session
if err := ConnectAndExec(nil); err != nil {
os.Remove(sockpath)
diff --git a/lib/ipc/send.go b/lib/ipc/send.go
index 4b09268c..fbe67413 100644
--- a/lib/ipc/send.go
+++ b/lib/ipc/send.go
@@ -5,13 +5,12 @@ import (
"errors"
"fmt"
"net"
- "path"
- "github.com/kyoh86/xdg"
+ "git.sr.ht/~rjarry/aerc/lib/xdg"
)
func ConnectAndExec(args []string) error {
- sockpath := path.Join(xdg.RuntimeDir(), "aerc.sock")
+ sockpath := xdg.RuntimePath("aerc.sock")
conn, err := net.Dial("unix", sockpath)
if err != nil {
return err