<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">I checked and <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">pathname-directory-pathname</code> is redundant, because of the guarantees provided by <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">ensure-directory-pathname</code>, but when I look at <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">get-pathname-defaults</code>, I am pretty sure it <em>cannot</em> be removed in the same way.</p>

<p dir="auto">After <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">get-pathname-defaults</code> any relative pathnames will be resolved by pathname merging, and we should be guaranteed to have an absolute pathname.</p>

<p dir="auto">AFAICT, <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">ensure-directory-pathname</code> can return a relative pathname.</p>

<p dir="auto">To be honest, I don't know if an absolute pathname is required, but I would have to understand a lot more of <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">uiop</code> to be sure it was safe to relax that constraint, so I left it. I'm willing to be convinced if you have more energy than I do.</p>

<p dir="auto">Best,<br>
R</p>

<p dir="auto">P.S. please send diffs with some more context if you can -- I find the following diff flags helpful: <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">--ignore-space-change -u -F '\''^(def'\''</code></p>

<p dir="auto">On 25 Jun 2019, at 17:10, Spenser Truex wrote:</p>

</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">"Robert Goldman" <rpgoldman@sift.info> writes:<br>
</p>
<blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999"><p dir="auto">OK, applied the revised fix, added tests, and pushed.<br>
<br>
On 25 Jun 2019, at 9:24, Robert Goldman wrote:<br>
<br>
    Generally this looks good, but why did you put the change in<br>
    with-current-directory instead of in call-with-current-directory, since the<br>
    former is just a thin wrapper around the latter?<br>
<br>
    They are both exported, so I think it would be better to put it there. That<br>
    leaves us with the following (rather ugly) form:<br>
<br>
    (let ((dir (resolve-symlinks*<br>
                         (get-pathname-defaults<br>
                          (pathname-directory-pathname<br>
                           (ensure-directory-pathname<br>
                            dir)))))<br>
           ...)<br>
      ...)<br>
<br>
    It's redundant to call pathname-directory-pathname on ensure-directory-pathname,<br>
    so we just need the latter.</p>
</blockquote><p dir="auto">Indeed, so why did you push the above code to<br>
<URL:<a href="https://gitlab.common-lisp.net/asdf/asdf/blob/b1ffbc47442973a18c43a44f6e17f0ff06ddfafd/uiop/filesystem.lisp" style="color:#777">https://gitlab.common-lisp.net/asdf/asdf/blob/b1ffbc47442973a18c43a44f6e17f0ff06ddfafd/uiop/filesystem.lisp</a> >?<br>
<br>
I suggest you do that reduction (below)<br>
<br>
*** /uiop/filesystem.lisp<br>
*** 491,499 ****<br>
  Note that this operation is usually NOT thread-safe."<br>
      (if dir<br>
          (let* ((dir (resolve-symlinks*<br>
-                      (get-pathname-defaults<br>
-                       (ensure-directory-pathname<br>
-                        dir))))<br>
                 (cwd (getcwd))<br>
                 (*default-pathname-defaults* dir))<br>
            (chdir dir)<br>
--- 491,498 ----<br>
  Note that this operation is usually NOT thread-safe."<br>
      (if dir<br>
          (let* ((dir (resolve-symlinks*<br>
+                      (ensure-directory-pathname<br>
+                       dir)))<br>
                 (cwd (getcwd))<br>
                 (*default-pathname-defaults* dir))<br>
            (chdir dir)<br>
<br>
--<br>
Spenser Truex<br>
<a href="https://spensertruex.com/" style="color:#777">https://spensertruex.com/</a><br>
San Francisco, USA</p>
</blockquote></div>
<div style="white-space:normal">
</div>
</div>
</body>
</html>