Merge pull request #62 from pidario/feat/dcc-support

start of DCC implementation
This commit is contained in:
Ken-Håvard Lieng 2020-05-19 10:44:07 +02:00 committed by GitHub
commit 63afd839be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 358 additions and 1 deletions

View file

@ -52,6 +52,14 @@ func (d directory) Key(username string) string {
return filepath.Join(d.User(username), "key.pem")
}
func (d directory) Downloads(username string) string {
return filepath.Join(d.User(username), "downloads")
}
func (d directory) DownloadedFile(username string, file string) string {
return filepath.Join(d.Downloads(username), file)
}
func (d directory) Config() string {
return filepath.Join(d.ConfigRoot(), "config.toml")
}

View file

@ -37,6 +37,11 @@ func NewUser(store Store) (*User, error) {
return nil, err
}
err = os.Mkdir(Path.Downloads(user.Username), 0700)
if err != nil {
return nil, err
}
return user, nil
}