[armedbear-cvs] r11581 - trunk/abcl/src/org/armedbear/lisp
Ville Voutilainen
vvoutilainen at common-lisp.net
Sat Jan 24 13:26:38 UTC 2009
Author: vvoutilainen
Date: Sat Jan 24 13:26:18 2009
New Revision: 11581
Log:
Make directory listing tolerate invalid paths and permission
errors. Note: clisp raises errors on permission denied, sbcl
doesn't and returns NIL. This patch makes abcl mirror sbcl
behaviour, so it returns NIL instead of raising errors.
Modified:
trunk/abcl/src/org/armedbear/lisp/Pathname.java
Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java Sat Jan 24 13:26:18 2009
@@ -1031,8 +1031,8 @@
if (s != null) {
File f = new File(s);
if (f.isDirectory()) {
- File[] files = f.listFiles();
try {
+ File[] files = f.listFiles();
for (int i = files.length; i-- > 0;) {
File file = files[i];
Pathname p;
@@ -1047,6 +1047,10 @@
return error(new FileError("Unable to list directory " + pathname.writeToString() + ".",
pathname));
}
+ catch (SecurityException e) {
+ }
+ catch (NullPointerException e) {
+ }
}
}
return result;
More information about the armedbear-cvs
mailing list