Skip to content

Commit

Permalink
Remove basedir check (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
pniedzwiedzinski committed Oct 12, 2020
1 parent 96fda08 commit 926fff0
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ func Init() error {
configDir = amforaAppData
} else {
// Unix / POSIX system
if basedir.ConfigHome == "" {
// Default to ~/.config/amfora
configDir = filepath.Join(home, ".config", "amfora")
} else {
configDir = filepath.Join(basedir.ConfigHome, "amfora")
}
configDir = filepath.Join(basedir.ConfigHome, "amfora")
}
configPath = filepath.Join(configDir, "config.toml")

Expand All @@ -84,12 +79,7 @@ func Init() error {
tofuDBDir = amforaAppData
} else {
// XDG cache dir on POSIX systems
if basedir.CacheHome == "" {
// Default to ~/.cache/amfora
tofuDBDir = filepath.Join(home, ".cache", "amfora")
} else {
tofuDBDir = filepath.Join(basedir.CacheHome, "amfora")
}
tofuDBDir = filepath.Join(basedir.CacheHome, "amfora")
}
tofuDBPath = filepath.Join(tofuDBDir, "tofu.toml")

Expand All @@ -99,12 +89,7 @@ func Init() error {
bkmkDir = amforaAppData
} else {
// XDG data dir on POSIX systems
if basedir.DataHome == "" {
// Default to ~/.local/share/amfora
bkmkDir = filepath.Join(home, ".local", "share", "amfora")
} else {
bkmkDir = filepath.Join(basedir.DataHome, "amfora")
}
bkmkDir = filepath.Join(basedir.DataHome, "amfora")
}
bkmkPath = filepath.Join(bkmkDir, "bookmarks.toml")

Expand Down

0 comments on commit 926fff0

Please sign in to comment.