aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-04-08 15:49:42 +0300
committerTulir Asokan <tulir@maunium.net>2020-04-08 15:49:42 +0300
commit79b61b86c9b5cd403c5ff3efcaf5a7237a1c07c7 (patch)
tree521b0ed709cab428e463d15d69a3a6f40358853c /config
parenta6f6fb3ef22658508671296a31367a198205da99 (diff)
Use $HOME/Downloads as default download directory
TODO: Get the default directory properly with XDG
Diffstat (limited to 'config')
-rw-r--r--config/config.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/config/config.go b/config/config.go
index 3507833..e62a8bd 100644
--- a/config/config.go
+++ b/config/config.go
@@ -78,16 +78,15 @@ type Config struct {
}
// NewConfig creates a config that loads data from the given directory.
-func NewConfig(configDir, cacheDir string) *Config {
- home, _ := os.UserHomeDir()
+func NewConfig(configDir, cacheDir, downloadDir string) *Config {
return &Config{
Dir: configDir,
CacheDir: cacheDir,
+ DownloadDir: downloadDir,
HistoryPath: filepath.Join(cacheDir, "history.db"),
RoomListPath: filepath.Join(cacheDir, "rooms.gob.gz"),
StateDir: filepath.Join(cacheDir, "state"),
MediaDir: filepath.Join(cacheDir, "media"),
- DownloadDir: home,
RoomCacheSize: 32,
RoomCacheAge: 1 * 60,