aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-30 12:06:22 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-30 12:06:22 +0300
commitd8dba100e041f6e6fc7cdd546ae161d5e52f0582 (patch)
treeec046917b74ec1e35e9944aa50f4155ed8c9f8e9 /config
parentcc929ba89959b98a18252da357415d942d240854 (diff)
Move cache to ~/.cache/gomuks by default. Fixes #39
Diffstat (limited to 'config')
-rw-r--r--config/config.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/config.go b/config/config.go
index e11b17a..b025115 100644
--- a/config/config.go
+++ b/config/config.go
@@ -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"),
}
}