Message5528

Author c.cerbo
Recipients amak, boisgera, c.cerbo, fwierzbicki, jdeolive, pjenvey
Date 2010-02-15.13:18:52
SpamBayes Score 4.3499153e-06
Marked as misclassified No
Message-id <1266239935.07.0.561320366375.issue1373@psf.upfronthosting.co.za>
In-reply-to
Content
This problem persists also with the new SyspathJavaLoader but the attached patch is obsolete. 

I've written a new patch:

Index: src/org/python/core/SyspathJavaLoader.java
===================================================================
--- src/org/python/core/SyspathJavaLoader.java	(revision 6980)
+++ src/org/python/core/SyspathJavaLoader.java	(working copy)
@@ -134,7 +134,7 @@
                 ZipEntry ze = archive.getEntry(entryRes);
                 if (ze != null) {
                 	try {
-						return new URL("jar:" + entry.__str__().toString() + "!/" + entryRes);
+						return new URL("jar:file:" + entry.__str__().toString() + "!/" + entryRes);
 					} catch (MalformedURLException e) {
 						throw new RuntimeException(e);
 					}
@@ -143,7 +143,11 @@
             }
             String dir = sys.getPath(entry.__str__().toString());
             try {
-				return new File(dir, res).toURI().toURL();
+				File resource = new File(dir, res);
+				if (!resource.exists()) {
+					continue;
+				}
+				return resource.toURI().toURL();
 			} catch (MalformedURLException e) {
 				throw new RuntimeException(e);
 			}


The unit test may be "recycled"
History
Date User Action Args
2010-02-15 13:18:55c.cerbosetmessageid: <1266239935.07.0.561320366375.issue1373@psf.upfronthosting.co.za>
2010-02-15 13:18:55c.cerbosetrecipients: + c.cerbo, fwierzbicki, amak, pjenvey, boisgera, jdeolive
2010-02-15 13:18:54c.cerbolinkissue1373 messages
2010-02-15 13:18:52c.cerbocreate