From fa99a96733828fc7fe65a10cc2ad14d6d2bf935f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken-H=C3=A5vard=20Lieng?= Date: Sun, 17 May 2020 02:31:50 +0200 Subject: [PATCH] Create download directory in NewUser --- storage/user.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/user.go b/storage/user.go index 66386862..cf86f379 100644 --- a/storage/user.go +++ b/storage/user.go @@ -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 }