Commit a01314f9 authored by mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Untabify.

parent cd048d63
...@@ -1641,14 +1641,14 @@ public class Pathname extends LispObject { ...@@ -1641,14 +1641,14 @@ public class Pathname extends LispObject {
for (int i = files.length; i-- > 0;) { for (int i = files.length; i-- > 0;) {
File file = files[i]; File file = files[i];
Pathname p; Pathname p;
String path; String path;
if (resolveSymlinks == NIL) { if (resolveSymlinks == NIL) {
path = file.getAbsolutePath(); path = file.getAbsolutePath();
} else { } else {
path = file.getCanonicalPath(); path = file.getCanonicalPath();
} }
URI pathURI = (new File(path)).toURI(); URI pathURI = (new File(path)).toURI();
p = new Pathname(pathURI.toString()); p = new Pathname(pathURI.toString());
result = new Cons(p, result); result = new Cons(p, result);
} }
} catch (IOException e) { } catch (IOException e) {
...@@ -2036,21 +2036,21 @@ public class Pathname extends LispObject { ...@@ -2036,21 +2036,21 @@ public class Pathname extends LispObject {
result.type = d.type; result.type = d.type;
} }
// CLtLv2 MERGE-PATHNAMES // CLtLv2 MERGE-PATHNAMES
// "[T]he missing components in the given pathname are filled // "[T]he missing components in the given pathname are filled
// in from the defaults pathname, except that if no version is // in from the defaults pathname, except that if no version is
// specified the default version is used." // specified the default version is used."
// "The merging rules for the version are more complicated and // "The merging rules for the version are more complicated and
// depend on whether the pathname specifies a name. If the // depend on whether the pathname specifies a name. If the
// pathname doesn't specify a name, then the version, if not // pathname doesn't specify a name, then the version, if not
// provided, will come from the defaults, just like the other // provided, will come from the defaults, just like the other
// components. However, if the pathname does specify a name, // components. However, if the pathname does specify a name,
// then the version is not affected by the defaults. The // then the version is not affected by the defaults. The
// reason is that the version ``belongs to'' some other file // reason is that the version ``belongs to'' some other file
// name and is unlikely to have anything to do with the new // name and is unlikely to have anything to do with the new
// one. Finally, if this process leaves the // one. Finally, if this process leaves the
// version missing, the default version is used." // version missing, the default version is used."
if (p.version != NIL) { if (p.version != NIL) {
result.version = p.version; result.version = p.version;
...@@ -2202,9 +2202,9 @@ public class Pathname extends LispObject { ...@@ -2202,9 +2202,9 @@ public class Pathname extends LispObject {
// Possibly canonicalize jar file directory // Possibly canonicalize jar file directory
Cons jars = (Cons) pathname.device; Cons jars = (Cons) pathname.device;
LispObject o = jars.car(); LispObject o = jars.car();
if (!(o instanceof Pathname)) { if (!(o instanceof Pathname)) {
return doTruenameExit(pathname, errorIfDoesNotExist); return doTruenameExit(pathname, errorIfDoesNotExist);
} }
if (o instanceof Pathname if (o instanceof Pathname
&& !(((Pathname)o).isURL()) && !(((Pathname)o).isURL())
// XXX Silently fail to call truename() if the default // XXX Silently fail to call truename() if the default
...@@ -2282,7 +2282,7 @@ public class Pathname extends LispObject { ...@@ -2282,7 +2282,7 @@ public class Pathname extends LispObject {
} }
} }
error: error:
return doTruenameExit(pathname, errorIfDoesNotExist); return doTruenameExit(pathname, errorIfDoesNotExist);
} }
static private LispObject doTruenameExit(Pathname pathname, boolean errorIfDoesNotExist) { static private LispObject doTruenameExit(Pathname pathname, boolean errorIfDoesNotExist) {
......
...@@ -134,18 +134,18 @@ error to its caller." ...@@ -134,18 +134,18 @@ error to its caller."
namestring nil resolve-symlinks)) namestring nil resolve-symlinks))
(matching-entries ())) (matching-entries ()))
(dolist (entry entries) (dolist (entry entries)
(when (when
(or (or
(and (and
(file-directory-p entry) (file-directory-p entry)
(pathname-match-p (file-namestring (pathname-as-file entry)) (pathname-match-p (file-namestring (pathname-as-file entry))
(file-namestring pathname))) (file-namestring pathname)))
(pathname-match-p (or (file-namestring entry) "") (file-namestring pathname))) (pathname-match-p (or (file-namestring entry) "") (file-namestring pathname)))
(push (push
(if resolve-symlinks (if resolve-symlinks
(truename entry) (truename entry)
entry) entry)
matching-entries))) matching-entries)))
matching-entries)))) matching-entries))))
;; Not wild. ;; Not wild.
(let ((truename (probe-file pathname))) (let ((truename (probe-file pathname)))
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
(dolist (file *test-files*) (dolist (file *test-files*)
(let ((file (merge-pathnames file *temp-directory-root*))) (let ((file (merge-pathnames file *temp-directory-root*)))
(ensure-directories-exist (directory-namestring file)) (ensure-directories-exist (directory-namestring file))
(unless (probe-file file) (unless (probe-file file)
(touch file))))) (touch file)))))
(defun remove-wild-test-hierarchy () (defun remove-wild-test-hierarchy ()
(ignore-errors (ignore-errors
(delete-directory-and-files *temp-directory-root*))) (delete-directory-and-files *temp-directory-root*)))
(defmacro with-test-directories (&rest body) (defmacro with-test-directories (&rest body)
`(prog2 (create-wild-test-hierarchy) `(prog2 (create-wild-test-hierarchy)
...@@ -32,21 +32,21 @@ ...@@ -32,21 +32,21 @@
(subsetp b a :test #'equal))) (subsetp b a :test #'equal)))
(deftest wild-pathnames.1 (deftest wild-pathnames.1
(with-test-directories (with-test-directories
(let ((results (let ((results
(directory (merge-pathnames "**/*.ext" (directory (merge-pathnames "**/*.ext"
*temp-directory-root*))) *temp-directory-root*)))
(expected (expected
(loop :for file :in *test-files* (loop :for file :in *test-files*
:collecting (merge-pathnames file :collecting (merge-pathnames file
*temp-directory-root*)))) *temp-directory-root*))))
(values (values
(eq (length results) (length expected)) (eq (length results) (length expected))
;; link --> file is not resolved by change in DIRECTORY to :RESOLVE-SYMLINKS nil ;; link --> file is not resolved by change in DIRECTORY to :RESOLVE-SYMLINKS nil
results results
expected expected
(set-equal (mapcar #'truename results) (set-equal (mapcar #'truename results)
(mapcar #'truename expected))))) (mapcar #'truename expected)))))
t) t)
(deftest wild-pathnames.2 (deftest wild-pathnames.2
...@@ -58,5 +58,5 @@ ...@@ -58,5 +58,5 @@
(merge-pathnames *temp-directory-root* "foo.ext")) (merge-pathnames *temp-directory-root* "foo.ext"))
t) t)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment