Author: nkinder
Update of /cvs/dirsec/console/src/com/netscape/management/client/preferences
In directory
cvs-int.fedora.redhat.com:/tmp/cvs-serv22252/src/com/netscape/management/client/preferences
Modified Files:
FilePreferenceManager.java
Log Message:
173947 - Added ability to build a Console RPM. The layout of Console can now be
distributed inside system locations instead of being self-contained.
Index: FilePreferenceManager.java
===================================================================
RCS file:
/cvs/dirsec/console/src/com/netscape/management/client/preferences/FilePreferenceManager.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- FilePreferenceManager.java 18 Jul 2005 00:34:15 -0000 1.1.1.1
+++ FilePreferenceManager.java 29 Nov 2005 18:37:01 -0000 1.2
@@ -32,7 +32,6 @@
* @author ahakim(a)netscape.com
*/
public class FilePreferenceManager extends PreferenceManager {
- private static String PREFERENCES_FOLDER = ".mcc";
private static String FILE_SEPARATOR = ".";
private static String FILE_SUFFIX = ".preferences";
private Hashtable _prefTable = new Hashtable();
@@ -46,21 +45,16 @@
public static String getHomePath() {
String homePath = null;
Properties p = System.getProperties();
- homePath = (String) p.get("user.home");
- if (homePath == null)
- homePath = ".";
- String prefPath = homePath + "/"+PREFERENCES_FOLDER;
-
- File f = new File(prefPath);
+ File f = new File(Console.PREFERENCE_DIR);
if (!f.exists())
f.mkdir();
if (!f.exists()) {
- Debug.println("error: cannot create/access" + prefPath);
- return homePath;
+ Debug.println("error: cannot create/access" +
Console.PREFERENCE_DIR);
+ return ".";
}
- return prefPath;
+ return Console.PREFERENCE_DIR;
}
Show replies by thread