aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repository/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repository/repo.go')
-rw-r--r--modules/repository/repo.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/repository/repo.go b/modules/repository/repo.go
index 01d4701c71..2d5551d987 100644
--- a/modules/repository/repo.go
+++ b/modules/repository/repo.go
@@ -6,7 +6,6 @@ package repository
import (
"fmt"
- "os"
"path"
"strings"
"time"
@@ -17,6 +16,7 @@ import (
"code.gitea.io/gitea/modules/setting"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/timeutil"
+ "code.gitea.io/gitea/modules/util"
"gopkg.in/ini.v1"
)
@@ -57,7 +57,7 @@ func MigrateRepositoryGitData(doer, u *models.User, repo *models.Repository, opt
migrateTimeout := time.Duration(setting.Git.Timeout.Migrate) * time.Second
var err error
- if err = os.RemoveAll(repoPath); err != nil {
+ if err = util.RemoveAll(repoPath); err != nil {
return repo, fmt.Errorf("Failed to remove %s: %v", repoPath, err)
}
@@ -73,7 +73,7 @@ func MigrateRepositoryGitData(doer, u *models.User, repo *models.Repository, opt
wikiPath := models.WikiPath(u.Name, opts.RepoName)
wikiRemotePath := WikiRemoteURL(opts.CloneAddr)
if len(wikiRemotePath) > 0 {
- if err := os.RemoveAll(wikiPath); err != nil {
+ if err := util.RemoveAll(wikiPath); err != nil {
return repo, fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
}
@@ -84,7 +84,7 @@ func MigrateRepositoryGitData(doer, u *models.User, repo *models.Repository, opt
Branch: "master",
}); err != nil {
log.Warn("Clone wiki: %v", err)
- if err := os.RemoveAll(wikiPath); err != nil {
+ if err := util.RemoveAll(wikiPath); err != nil {
return repo, fmt.Errorf("Failed to remove %s: %v", wikiPath, err)
}
}