mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	fix submodule is nil panic (#23588)
#23587 submodule path is nil It is panic a nil error --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
		@@ -214,7 +214,9 @@ func GetContents(ctx context.Context, repo *repo_model.Repository, treePath, ref
 | 
				
			|||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
			return nil, err
 | 
								return nil, err
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		contentsResponse.SubmoduleGitURL = &submodule.URL
 | 
							if submodule != nil && submodule.URL != "" {
 | 
				
			||||||
 | 
								contentsResponse.SubmoduleGitURL = &submodule.URL
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	// Handle links
 | 
						// Handle links
 | 
				
			||||||
	if entry.IsRegular() || entry.IsLink() {
 | 
						if entry.IsRegular() || entry.IsLink() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user