mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
リポジトリ作成ロジック修正
This commit is contained in:
1 file changed
+4
-2
@@ -4,6 +4,7 @@ import org.eclipse.jgit.internal.storage.file.FileRepository;
|
|||||||
import org.eclipse.jgit.lib.Repository;
|
import org.eclipse.jgit.lib.Repository;
|
||||||
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -25,8 +26,9 @@ public class RepoUtils {
|
|||||||
Path rootPath = fileUtils.getExternalFilesDirPath();
|
Path rootPath = fileUtils.getExternalFilesDirPath();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Repository repo = new FileRepository(rootPath.resolve(id).resolve(".git").toFile());
|
Repository repo = FileRepositoryBuilder.create(
|
||||||
repo.create();
|
new File(rootPath.resolve(id).resolve(".git").toString())
|
||||||
|
);
|
||||||
return repo;
|
return repo;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO-rca: handle exception
|
// TODO-rca: handle exception
|
||||||
|
|||||||
Reference in new issue
Block a user