aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index f8782db71e..e1073419a3 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1187,6 +1187,7 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
}
// Rename remote repository to new path and delete local copy.
+ os.MkdirAll(UserPath(newOwner.Name), os.ModePerm)
if err = os.Rename(RepoPath(owner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil {
return fmt.Errorf("rename repository directory: %v", err)
}