Merge pull request #62 from pidario/feat/dcc-support
start of DCC implementation
This commit is contained in:
commit
63afd839be
13 changed files with 358 additions and 1 deletions
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue