[armedbear-cvs] r13474 - branches/0.26.x/abcl/src/org/armedbear/lisp
mevenson at common-lisp.net
mevenson at common-lisp.net
Sat Aug 13 05:08:51 UTC 2011
Author: mevenson
Date: Fri Aug 12 22:08:51 2011
New Revision: 13474
Log:
Backport r13460: Fix loading from fasls under Windows with whitespace in pathname.
Modified:
branches/0.26.x/abcl/src/org/armedbear/lisp/Load.java
branches/0.26.x/abcl/src/org/armedbear/lisp/Pathname.java
Modified: branches/0.26.x/abcl/src/org/armedbear/lisp/Load.java
==============================================================================
--- branches/0.26.x/abcl/src/org/armedbear/lisp/Load.java Fri Aug 12 15:31:54 2011 (r13473)
+++ branches/0.26.x/abcl/src/org/armedbear/lisp/Load.java Fri Aug 12 22:08:51 2011 (r13474)
@@ -158,7 +158,7 @@
n = "jar:" + n + "!/" + name + "."
+ COMPILE_FILE_INIT_FASL_TYPE;
} else {
- n = "jar:file:" + n + "!/" + name + "."
+ n = "jar:file:" + Pathname.uriEncode(n) + "!/" + name + "."
+ COMPILE_FILE_INIT_FASL_TYPE;
}
mergedPathname = new Pathname(n);
Modified: branches/0.26.x/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- branches/0.26.x/abcl/src/org/armedbear/lisp/Pathname.java Fri Aug 12 15:31:54 2011 (r13473)
+++ branches/0.26.x/abcl/src/org/armedbear/lisp/Pathname.java Fri Aug 12 22:08:51 2011 (r13474)
@@ -373,9 +373,13 @@
+ "'" + url.toString() + "'"
+ ": " + ex.toString()));
}
- final String uriPath = uri.getPath();
+ String uriPath = uri.getPath();
if (null == uriPath) {
- error(new LispError("The URI has no path: " + uri));
+ // We make an exception for forms like "file:z:/foo/path"
+ uriPath = uri.getSchemeSpecificPart();
+ if (uriPath == null || uriPath.equals("")) {
+ error(new LispError("The URI has no path: " + uri));
+ }
}
final File file = new File(uriPath);
final Pathname p = new Pathname(file.getPath());
More information about the armedbear-cvs
mailing list