jython/jython-cachedir.patch
2011-03-11 13:04:17 +00:00

19 lines
877 B
Diff

diff -ur jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java jython-svn-Release_2_2beta1.patched/src/org/python/core/PySystemState.java
--- jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-02-07 02:19:53.000000000 -0500
+++ jython-svn-Release_2_2beta1/src/org/python/core/PySystemState.java 2007-03-23 09:41:27.000000000 -0400
@@ -534,7 +534,13 @@
}
cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME));
if (!cachedir.isAbsolute()) {
- cachedir = new File(PySystemState.prefix, cachedir.getPath());
+ File jythondir = new File(System.getProperty("user.home"), ".jython-cache");
+
+ if (!jythondir.isDirectory()) {
+ jythondir.mkdirs();
+ }
+
+ cachedir = new File(jythondir, cachedir.getPath());
}
}