diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2020-05-29 21:57:37 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-05-31 12:47:21 -0400 |
commit | 0b2d41b8584e16d6f7abeca92eaae326033b4489 (patch) | |
tree | 5e1fce0e7dd7c90c98188d22060edc85c3977c82 /org.eclipse.jgit.gpg.bc.test/about.html | |
parent | 089eacb273e98b659d4f2c15721c1524e084ae07 (diff) | |
download | jgit-0b2d41b8584e16d6f7abeca92eaae326033b4489.tar.gz jgit-0b2d41b8584e16d6f7abeca92eaae326033b4489.zip |
Verify that the user home directory is valid
If the determination of the user home directory produces a Java File
object with an invalid path, spurious exceptions may occur at the
most inopportune moments anytime later. In the case in the linked bug
report, start-up of EGit failed, leading to numerous user-visible
problems in Eclipse.
So validate the return value of FS.userHomeImpl(). If converting that
File to a Path throws an exception, log the problem and fall back to
Java system property user.home. If that also is not valid, use null.
(A null user home directory is allowed by FS, and calling in Java
new File(null, "some_string") is fine and produces a File relative
to the current working directory.)
Bug: 563739
Change-Id: If9eec0f9a31a45bd815231706285c71b09f8cf56
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.gpg.bc.test/about.html')
0 files changed, 0 insertions, 0 deletions