public static void main(String[] args) throws IOException, GitAPIException {
try (Repository repository = CookbookHelper.createNewRepository()) {
System.out.println("Repository at " + repository.getWorkTree());
File untrackedFile = File.createTempFile("untracked", ".txt", repository.getWorkTree());
File untrackedDir = File.createTempFile("untrackedDir", "", repository.getWorkTree());
<BUG>untrackedDir.delete();

untrackedDir.mkdirs();

System.out.println("Untracked exists: " + untrackedFile.exists() + " Dir: " + untrackedDir.exists() + "/" + untrackedDir.isDirectory());</BUG>
try (Git git = new Git(repository)) {

public static void main(String[] args) throws IOException, GitAPIException {
try (Repository repository = CookbookHelper.createNewRepository()) {
System.out.println("Repository at " + repository.getWorkTree());
File untrackedFile = File.createTempFile("untracked", ".txt", repository.getWorkTree());
File untrackedDir = File.createTempFile("untrackedDir", "", repository.getWorkTree());
if(!untrackedDir.delete()) {
throw new IOException("Could not delete file " + untrackedDir);
}
if(!untrackedDir.mkdirs()) {
throw new IOException("Could not create directory " + untrackedDir);
}
System.out.println("Untracked exists: " + untrackedFile.exists() + " Dir: " + untrackedDir.exists() + "/" + untrackedDir.isDirectory());
try (Git git = new Git(repository)) {
