mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
More fault resistant logic to locate .cvsignore
This commit is contained in:
@@ -36,7 +36,12 @@ public class UserDirIgnores{
|
||||
static {
|
||||
final String home = System.getenv().get("HOME");
|
||||
if (home != null) {
|
||||
ourUserHomeCVSIgnoreFile = new File(home + "/" + CvsUtil.CVS_IGNORE_FILE);
|
||||
final File homeDir = new File(home);
|
||||
if (homeDir.exists() && homeDir.isDirectory()) {
|
||||
ourUserHomeCVSIgnoreFile = new File(homeDir, CvsUtil.CVS_IGNORE_FILE);
|
||||
} else {
|
||||
ourUserHomeCVSIgnoreFile = new File(System.getProperty("user.home") + "/" + CvsUtil.CVS_IGNORE_FILE);
|
||||
}
|
||||
} else {
|
||||
ourUserHomeCVSIgnoreFile = new File(System.getProperty("user.home") + "/" + CvsUtil.CVS_IGNORE_FILE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user