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));
|
return new MimetypesFileTypeMap().getContentType(Network.uriFileName(path));
|
||||||
} else {
|
} else {
|
||||||
repoPath = "%s/%s.git".formatted(repoPath, repoName);
|
repoPath = "%s/%s.git".formatted(repoPath, repoName.toLowerCase());
|
||||||
// 仓库
|
// 仓库
|
||||||
@Cleanup
|
@Cleanup
|
||||||
org.eclipse.jgit.lib.Repository repo = new FileRepositoryBuilder().setGitDir(Path.of(repoPath).toFile()).build();
|
org.eclipse.jgit.lib.Repository repo = new FileRepositoryBuilder().setGitDir(Path.of(repoPath).toFile()).build();
|
||||||
|
|||||||
Reference in New Issue
Block a user