Skip to content

Commit 58c105d

Browse files
authored
Check for notExist on profile repository page (#14197) (#14203)
Backport #14197 Fix #14189
1 parent afa7f22 commit 58c105d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

routers/user/setting/profile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ func Repos(ctx *context.Context) {
227227
root := filepath.Join(models.UserPath(ctxUser.Name))
228228
if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
229229
if err != nil {
230+
if os.IsNotExist(err) {
231+
return nil
232+
}
230233
return err
231234
}
232235
if !info.IsDir() || path == root {

0 commit comments

Comments
 (0)