2023-06-27 17:32:50 +02:00
|
|
|
diff --git a/src/org/python/core/PySystemState.java b/src/org/python/core/PySystemState.java
|
|
|
|
index 1fb701d..ee9b38f 100644
|
|
|
|
--- a/src/org/python/core/PySystemState.java
|
|
|
|
+++ b/src/org/python/core/PySystemState.java
|
|
|
|
@@ -1278,9 +1278,11 @@ public class PySystemState extends PyObject
|
2007-01-16 00:19:17 +01:00
|
|
|
}
|
2011-03-11 14:04:17 +01:00
|
|
|
cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME));
|
2007-01-16 00:19:17 +01:00
|
|
|
if (!cachedir.isAbsolute()) {
|
2023-06-27 17:32:50 +02:00
|
|
|
- String prefixString = props.getProperty("user.dir", "");
|
|
|
|
- cachedir = new File(prefixString, cachedir.getPath());
|
|
|
|
- cachedir = cachedir.getAbsoluteFile();
|
2011-03-11 14:04:17 +01:00
|
|
|
+ File jythondir = new File(System.getProperty("user.home"), ".jython-cache");
|
2007-01-16 00:19:17 +01:00
|
|
|
+ if (!jythondir.isDirectory()) {
|
|
|
|
+ jythondir.mkdirs();
|
|
|
|
+ }
|
|
|
|
+ cachedir = new File(jythondir, cachedir.getPath());
|
|
|
|
}
|
2023-06-27 17:32:50 +02:00
|
|
|
logger.log(Level.CONFIG, "cache at {0}", cachedir);
|
2007-01-16 00:19:17 +01:00
|
|
|
}
|