Update of /cvsroot/jython/jython/org/python/core
In directory usw-pr-cvs1:/tmp/cvs-serv30710
Modified Files:
PySystemState.java
Log Message:
initRegistry(): Gracefully handle an empty prefix. The empty prefx can
happen when jython.jar is located in cwd and is added to the CLASSPATH
without a directory. The empty prefix would then cause the cachedir to
be written in the root. yuck.
Index: PySystemState.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/PySystemState.java,v
retrieving revision 2.58
retrieving revision 2.59
diff -C2 -r2.58 -r2.59
*** PySystemState.java 2001/07/03 21:05:28 2.58
--- PySystemState.java 2001/07/09 20:35:11 2.59
***************
*** 290,293 ****
--- 290,296 ----
// Load the default registry
if (prefix != null) {
+ if (prefix.length() == 0) {
+ prefix = exec_prefix = ".";
+ }
try {
addRegistryFile(new File(prefix, "registry"));
|