Check for notExist on profile repository page (#14197)

Fix #14189
tokarchuk/v1.17
zeripath 4 years ago committed by GitHub
parent 632800eda7
commit ef825bd242
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      routers/user/setting/profile.go

@ -235,6 +235,9 @@ func Repos(ctx *context.Context) {
root := filepath.Join(models.UserPath(ctxUser.Name)) root := filepath.Join(models.UserPath(ctxUser.Name))
if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if err != nil { if err != nil {
if os.IsNotExist(err) {
return nil
}
return err return err
} }
if !info.IsDir() || path == root { if !info.IsDir() || path == root {

Loading…
Cancel
Save