summaryrefslogtreecommitdiffstats
path: root/modules/options
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-12-22 00:40:57 +0100
committerGitHub <noreply@github.com>2020-12-22 00:40:57 +0100
commitacd5e5a868c2c158132b4017f318943d1e6c573f (patch)
treed7e440a5add88a6779f605c82fa6e9085ebd424d /modules/options
parent[skip ci] Updated translations via Crowdin (diff)
downloadforgejo-acd5e5a868c2c158132b4017f318943d1e6c573f.tar.xz
forgejo-acd5e5a868c2c158132b4017f318943d1e6c573f.zip
Add StatDir and replace com.StatDir (#14099)
* Add StatDir and replace com.StatDir * a nit * Remove wrong file Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules/options')
-rw-r--r--modules/options/dynamic.go6
-rw-r--r--modules/options/static.go4
2 files changed, 3 insertions, 7 deletions
diff --git a/modules/options/dynamic.go b/modules/options/dynamic.go
index 060ca12bb0..ffb89df882 100644
--- a/modules/options/dynamic.go
+++ b/modules/options/dynamic.go
@@ -14,8 +14,6 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
-
- "github.com/unknwon/com"
)
var (
@@ -39,7 +37,7 @@ func Dir(name string) ([]string, error) {
return []string{}, fmt.Errorf("Unabe to check if custom directory %s is a directory. %v", customDir, err)
}
if isDir {
- files, err := com.StatDir(customDir, true)
+ files, err := util.StatDir(customDir, true)
if err != nil {
return []string{}, fmt.Errorf("Failed to read custom directory. %v", err)
@@ -55,7 +53,7 @@ func Dir(name string) ([]string, error) {
return []string{}, fmt.Errorf("Unabe to check if static directory %s is a directory. %v", staticDir, err)
}
if isDir {
- files, err := com.StatDir(staticDir, true)
+ files, err := util.StatDir(staticDir, true)
if err != nil {
return []string{}, fmt.Errorf("Failed to read static directory. %v", err)
diff --git a/modules/options/static.go b/modules/options/static.go
index ff1e6b2332..5f4ffdda78 100644
--- a/modules/options/static.go
+++ b/modules/options/static.go
@@ -14,8 +14,6 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
-
- "github.com/unknwon/com"
)
var (
@@ -38,7 +36,7 @@ func Dir(name string) ([]string, error) {
return []string{}, fmt.Errorf("Failed to check if custom directory %s is a directory. %v", err)
}
if isDir {
- files, err := com.StatDir(customDir, true)
+ files, err := util.StatDir(customDir, true)
if err != nil {
return []string{}, fmt.Errorf("Failed to read custom directory. %v", err)