From 58c105d4bf962711b084cdedb253cf4a30c54c7d Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 31 Dec 2020 13:03:56 +0000 Subject: [PATCH] Check for notExist on profile repository page (#14197) (#14203) Backport #14197 Fix #14189 --- routers/user/setting/profile.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go index 6653230a39..6caa1143ec 100644 --- a/routers/user/setting/profile.go +++ b/routers/user/setting/profile.go @@ -227,6 +227,9 @@ func Repos(ctx *context.Context) { root := filepath.Join(models.UserPath(ctxUser.Name)) if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { if err != nil { + if os.IsNotExist(err) { + return nil + } return err } if !info.IsDir() || path == root {