Преглед на файлове

Merge "Fix NPE on reading global config on MAC" into stable-0.11

tags/v0.11.1
Chris Aniszczyk преди 13 години
родител
ревизия
b46e06bc74
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6
    1
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java

+ 6
- 1
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java Целия файл

@@ -66,7 +66,12 @@ abstract class FS_POSIX extends FS {
String w = readPipe(userHome(), //
new String[] { "bash", "--login", "-c", "which git" }, //
Charset.defaultCharset().name());
return new File(w).getParentFile().getParentFile();
if (w == null || w.length() == 0)
return null;
File parentFile = new File(w).getParentFile();
if (parentFile == null)
return null;
return parentFile.getParentFile();
}

return null;

Loading…
Отказ
Запис