Fix config directory in flatpak
This commit is contained in:
parent
6084844a31
commit
4c8fb1d2ab
|
@ -3,6 +3,7 @@ package cmd
|
|||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"strings"
|
||||
|
||||
"github.com/awnumar/memguard"
|
||||
"github.com/quexten/goldwarden/agent"
|
||||
|
@ -22,6 +23,8 @@ var daemonizeCmd = &cobra.Command{
|
|||
isFlatpak := err == nil
|
||||
if isFlatpak {
|
||||
runtimeConfig.ConfigDirectory = "~/.var/app/com.quexten.Goldwarden/config/goldwarden.json"
|
||||
userHome, _ := os.UserHomeDir()
|
||||
runtimeConfig.ConfigDirectory = strings.ReplaceAll(runtimeConfig.ConfigDirectory, "~", userHome)
|
||||
println("Flatpak Config directory: " + runtimeConfig.ConfigDirectory)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue