Community
Participate
Working Groups
The getXDGConfigHome method of the org.eclipse.jgit.util.SystemReader class raises an exception if the config path already exists but is not a directory. The SystemReader getXDGConfigHome method attempts to create the $HOME/.config directory using createDirectories, which does not fail if the 'directory' already exists, but on my system $HOME/.config is a symlink to a directory somewhere else. https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createDirectories(java.nio.file.Path,%20java.nio.file.attribute.FileAttribute...)
This is https://bugs.openjdk.java.net/browse/JDK-8130464 . :-( Java lacks a Files.createDirectories() that would follow symlinks.
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/167001
(In reply to Eclipse Genie from comment #2) > New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/167001 Superseded by https://git.eclipse.org/r/c/jgit/jgit/+/168096 . Turns out that trying to create the directory at that time is wrong anyway. It should be created only when JGit tries to write a file there, and code for that already exists and uses a variation that will also work with symlinks.
Gerrit change https://git.eclipse.org/r/c/jgit/jgit/+/168096 was merged to [master]. Commit: http://git.eclipse.org/c/jgit/jgit.git/commit/?id=e9c7ba6fdccf64b16fdadd74106175f95454ec4f