diff options
Diffstat (limited to 'modules/repository/create.go')
-rw-r--r-- | modules/repository/create.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/repository/create.go b/modules/repository/create.go index 2f7d10f0d1..945f4a8cea 100644 --- a/modules/repository/create.go +++ b/modules/repository/create.go @@ -6,13 +6,13 @@ package repository import ( "fmt" - "os" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" ) // CreateRepository creates a repository for the user/organization. @@ -48,7 +48,7 @@ func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (_ *m if !opts.IsMirror { repoPath := models.RepoPath(u.Name, repo.Name) if err = initRepository(ctx, repoPath, doer, repo, opts); err != nil { - if err2 := os.RemoveAll(repoPath); err2 != nil { + if err2 := util.RemoveAll(repoPath); err2 != nil { log.Error("initRepository: %v", err) return fmt.Errorf( "delete repo directory %s/%s failed(2): %v", u.Name, repo.Name, err2) |