Check for notExist on profile repository page (#14197) (#14203)

Backport #14197

Fix #14189
This commit is contained in:
zeripath 2020-12-31 13:03:56 +00:00 committed by GitHub
parent afa7f22dd8
commit 58c105d4bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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 {