From aaac9d76925b2b15e100e145c1f8a4b781c48a92 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 17 May 2007 22:01:41 +0000
Subject: [PATCH] Made minor fix and improved messages for errors when the user lacks the proper file system access permissions to use the upgrade tool. Also updated the text on the Welcome page to reflect removal of the build browsing capability.
---
opends/src/quicksetup/org/opends/quicksetup/Installation.java | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Installation.java b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
index 26a4ffd..eab83f5 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Installation.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -230,17 +230,22 @@
failureReason = "does not exist";
} else {
String[] children = rootDirectory.list();
- Set<String> childrenSet = new HashSet<String>(Arrays.asList(children));
- String[] dirsToCheck = new String[] {
- CONFIG_PATH_RELATIVE,
- DATABASES_PATH_RELATIVE,
- LIBRARIES_PATH_RELATIVE,
- // perhaps we should check more
- };
- for (String dir : dirsToCheck) {
- if (!childrenSet.contains(dir)) {
- failureReason = "does not contain directory '" + dir + "'";
+ if (children != null) {
+ Set<String> childrenSet = new HashSet<String>(Arrays.asList(children));
+ String[] dirsToCheck = new String[] {
+ CONFIG_PATH_RELATIVE,
+ DATABASES_PATH_RELATIVE,
+ LIBRARIES_PATH_RELATIVE,
+ // perhaps we should check more
+ };
+ for (String dir : dirsToCheck) {
+ if (!childrenSet.contains(dir)) {
+ failureReason = "does not contain directory '" + dir + "'";
+ }
}
+ } else {
+ failureReason = "is empty or you lack permissions " +
+ "to access this directory";
}
}
if (failureReason != null) {
--
Gitblit v1.10.0