uiop:directory-files doesn't behave on paths without a trailing slash
Spenser Truex
web at spensertruex.com
Tue Jun 25 22:10:35 UTC 2019
"Robert Goldman" <rpgoldman at sift.info> writes:
> OK, applied the revised fix, added tests, and pushed.
>
> On 25 Jun 2019, at 9:24, Robert Goldman wrote:
>
> Generally this looks good, but why did you put the change in
> with-current-directory instead of in call-with-current-directory, since the
> former is just a thin wrapper around the latter?
>
> They are both exported, so I think it would be better to put it there. That
> leaves us with the following (rather ugly) form:
>
> (let ((dir (resolve-symlinks*
> (get-pathname-defaults
> (pathname-directory-pathname
> (ensure-directory-pathname
> dir)))))
> ...)
> ...)
>
> It's redundant to call pathname-directory-pathname on ensure-directory-pathname,
> so we just need the latter.
Indeed, so why did you push the above code to
<URL:https://gitlab.common-lisp.net/asdf/asdf/blob/b1ffbc47442973a18c43a44f6e17f0ff06ddfafd/uiop/filesystem.lisp >?
I suggest you do that reduction (below)
*** /uiop/filesystem.lisp
*** 491,499 ****
Note that this operation is usually NOT thread-safe."
(if dir
(let* ((dir (resolve-symlinks*
- (get-pathname-defaults
- (ensure-directory-pathname
- dir))))
(cwd (getcwd))
(*default-pathname-defaults* dir))
(chdir dir)
--- 491,498 ----
Note that this operation is usually NOT thread-safe."
(if dir
(let* ((dir (resolve-symlinks*
+ (ensure-directory-pathname
+ dir)))
(cwd (getcwd))
(*default-pathname-defaults* dir))
(chdir dir)
--
Spenser Truex
https://spensertruex.com/
San Francisco, USA
More information about the asdf-devel
mailing list