l10n, create dir on creating file

This commit is contained in:
Wancat
2022-11-04 23:17:17 +08:00
parent 9f99aad680
commit 7c63223aa0
4 changed files with 15 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ func (u *User) Dir() string {
}
func (u *User) FilePath(name string) string {
return path.Join(DATA_DIR, u.Email, name)
return path.Join(u.Dir(), name)
}
func (u *User) File(name string) (*os.File, error) {