mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 10:44:12 +01:00 
			
		
		
		
	Remove local wiki copy on repo transfer. Fixes #2558
This commit is contained in:
		
							parent
							
								
									23bc9a2911
								
							
						
					
					
						commit
						ce3708b3ea
					
				@ -1103,6 +1103,7 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
 | 
			
		||||
 | 
			
		||||
	wikiPath := WikiPath(owner.Name, repo.Name)
 | 
			
		||||
	if com.IsExist(wikiPath) {
 | 
			
		||||
		RemoveAllWithNotice("Delete repository wiki local copy", repo.LocalWikiPath())
 | 
			
		||||
		if err = os.Rename(wikiPath, WikiPath(newOwner.Name, repo.Name)); err != nil {
 | 
			
		||||
			return fmt.Errorf("rename repository wiki: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user