fix fetch MimeType fail for git
This commit is contained in:
@ -175,7 +175,7 @@ public class RepositoryServiceImplement implements RepositoryService {
|
||||
// 根据文件名猜测
|
||||
return new MimetypesFileTypeMap().getContentType(Network.uriFileName(path));
|
||||
} else {
|
||||
repoPath = "%s/%s.git".formatted(repoPath, repoName);
|
||||
repoPath = "%s/%s.git".formatted(repoPath, repoName.toLowerCase());
|
||||
// 仓库
|
||||
@Cleanup
|
||||
org.eclipse.jgit.lib.Repository repo = new FileRepositoryBuilder().setGitDir(Path.of(repoPath).toFile()).build();
|
||||
|
||||
Reference in New Issue
Block a user