use cross-platform filepath function

This commit is contained in:
Michele Balistreri 2024-01-18 11:35:33 +01:00
parent b29cbbfef6
commit 16d62b4536
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A

View File

@ -3,7 +3,7 @@ package statuskeycardgo
import ( import (
"encoding/json" "encoding/json"
"os" "os"
"path" "path/filepath"
) )
type pairingStore struct { type pairingStore struct {
@ -17,7 +17,7 @@ func newPairingStore(storage string) (*pairingStore, error) {
if err != nil { if err != nil {
if os.IsNotExist(err) { if os.IsNotExist(err) {
parent := path.Dir(p.path) parent := filepath.Dir(p.path)
err = os.MkdirAll(parent, 0750) err = os.MkdirAll(parent, 0750)
if err != nil { if err != nil {