#92 -- Fix .git removing

This commit is contained in:
Anton Romanov 2023-02-20 11:08:49 +04:00
parent a3a032b70b
commit 220854401e

View File

@ -31,6 +31,8 @@ public class GitRepository extends BaseEntity {
}
private String removeDotGit(String prevName) {
return prevName.substring(0, prevName.lastIndexOf(".git"));
return prevName.lastIndexOf(".git") > 0
? prevName.substring(0, prevName.lastIndexOf(".git"))
: prevName;
}
}