summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/web/user/setting/profile.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go
index dac00850b1..af16195250 100644
--- a/routers/web/user/setting/profile.go
+++ b/routers/web/user/setting/profile.go
@@ -280,17 +280,17 @@ func Repos(ctx *context.Context) {
repos := map[string]*repo_model.Repository{}
// We're going to iterate by pagesize.
root := user_model.UserPath(ctxUser.Name)
- if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
+ if err := filepath.WalkDir(root, func(path string, d os.DirEntry, err error) error {
if err != nil {
if os.IsNotExist(err) {
return nil
}
return err
}
- if !info.IsDir() || path == root {
+ if !d.IsDir() || path == root {
return nil
}
- name := info.Name()
+ name := d.Name()
if !strings.HasSuffix(name, ".git") {
return filepath.SkipDir
}
@@ -304,7 +304,7 @@ func Repos(ctx *context.Context) {
count++
return filepath.SkipDir
}); err != nil {
- ctx.ServerError("filepath.Walk", err)
+ ctx.ServerError("filepath.WalkDir", err)
return
}