Move cache to ~/.cache/gomuks by default. Fixes #39

This commit is contained in:
Tulir Asokan
2018-04-30 12:06:22 +03:00
parent cc929ba899
commit d8dba100e0
2 changed files with 6 additions and 5 deletions

View File

@ -38,11 +38,11 @@ type Config struct {
}
// NewConfig creates a config that loads data from the given directory.
func NewConfig(dir string) *Config {
func NewConfig(configDir, cacheDir string) *Config {
return &Config{
Dir: dir,
HistoryDir: filepath.Join(dir, "history"),
MediaDir: filepath.Join(dir, "media"),
Dir: configDir,
HistoryDir: filepath.Join(cacheDir, "history"),
MediaDir: filepath.Join(cacheDir, "media"),
}
}