From: Finn B. <bc...@us...> - 2001-12-04 10:24:36
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv20852 Modified Files: SysPackageManager.java Log Message: Fix for "[ #456926 ] PackageManager doesn't work correctly". When f.ex. PyServlet called sys.add_extdir(), the cache file was written but the index wasn't updated. Index: SysPackageManager.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/SysPackageManager.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SysPackageManager.java 2001/10/28 17:13:43 1.9 --- SysPackageManager.java 2001/12/04 10:24:34 1.10 *************** *** 42,45 **** --- 42,49 ---- public void addJarDir(String jdir) { + addJarDir(jdir, true); + } + + public void addJarDir(String jdir, boolean save) { File file = new File(jdir); if (!file.isDirectory()) return; *************** *** 51,54 **** --- 55,60 ---- } } + if (save) + saveCache(); } *************** *** 59,63 **** // ??pending: do jvms trim? how is interpreted entry=""? String entry = tok.nextToken(); ! addJarDir(entry); } } --- 65,69 ---- // ??pending: do jvms trim? how is interpreted entry=""? String entry = tok.nextToken(); ! addJarDir(entry, false); } } |