mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-30 03:29:46 +09:00
Merge branch 'main' into feature/bots
This commit is contained in:
@@ -64,7 +64,7 @@ func Copy(src, dest string) error {
|
||||
func CopyDir(srcPath, destPath string, filters ...func(filePath string) bool) error {
|
||||
// Check if target directory exists.
|
||||
if _, err := os.Stat(destPath); !errors.Is(err, os.ErrNotExist) {
|
||||
return errors.New("file or directory already exists: " + destPath)
|
||||
return util.NewAlreadyExistErrorf("file or directory already exists: %s", destPath)
|
||||
}
|
||||
|
||||
err := os.MkdirAll(destPath, os.ModePerm)
|
||||
|
||||
Reference in New Issue
Block a user