<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>
</head>
<body>
<style type="text/css">
img {
max-width: 100%; height: auto;
}
</style>
<div class="content">
<h3>
Raymond Toy pushed to branch master
at <a href="https://gitlab.common-lisp.net/cmucl/cmucl">cmucl / cmucl</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/17499591af64215a2626280cd585128474bdb850">17499591</a></strong>
<div>
<span>by Elias Pipping</span>
<i>at 2016-09-28T21:21:52+00:00</i>
</div>
<pre class="commit-message" style="margin: 0; white-space: pre-wrap">Fix: directory followed symlinks with :follow-links nil
</pre>
</li>
<li>
<strong><a href="https://gitlab.common-lisp.net/cmucl/cmucl/commit/4bf2062f18694d662f79d25c04989f61eab87460">4bf2062f</a></strong>
<div>
<span>by Raymond Toy</span>
<i>at 2016-10-02T16:48:11+00:00</i>
</div>
<pre class="commit-message" style="margin: 0; white-space: pre-wrap">Merge branch 'master' into 'master'
Fix: directory followed symlinks with :follow-links nil
I'm on Linux. I'm looking at a directory that contains both physical directories and symbolic links to directories.
### What I would expect:
```common-lisp
(directory "/path/to/dir/*.*" :check-for-subdirs t :follow-links t :truenamep nil)
```
will show both (because it will show everything in that directory) and mark both types as directories with trailing slashes.
```common-lisp
(directory "/path/to/dir/*.*" :check-for-subdirs t :follow-links nil :truenamep nil)
```
will again show all files but only add trailing slashes to the physical subdirectories.
### What actually happens
Both commands give me the same output. That is because `directory` calls `unix:unix-file-kind` to categorise files into directory/link/etc., which internally calls `stat`. It will only use `lstat` if the second, optional argument is passed as **t**. In default mode (the way it currently is) symlinks to directories will be assigned the type :directory regardless of the flags passed to `directory`.
I believe the change contained in this merge request is thus the correct fix.
See merge request !15</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class="file-stats">
<a href="#diff-0" style="text-decoration: none">
src/code/filesys.lisp
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id="diff-0">
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/compare/3d18025d13e030958e44641c7c4cec18408831cc...4bf2062f18694d662f79d25c04989f61eab87460#diff-0"><strong>src/code/filesys.lisp</strong></a>
<hr>
<table class="code white" style="-premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; background: #fff; font-family: monospace; font-size: 13px" bgcolor="#fff" width="100%" cellpadding="0" cellspacing="0">
<tr class="line_holder match" style="line-height: 1.5">
<td class="diff-line-num unfold js-unfold old_line" data-linenumber="1125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">...</td>
<td class="diff-line-num unfold js-unfold new_line" data-linenumber="1125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">...</td>
<td class="line_content match " style="background: #fafafa; color: rgba(0,0,0,0.3); padding-left: 0.5em; padding-right: 0.5em" bgcolor="#fafafa">@@ -1125,7 +1125,7 @@ optionally keeping some of the most recent old versions."</td>
</tr>
<tr class="line_holder" style="line-height: 1.5">
<td class="diff-line-num old_line" data-linenumber="1125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1125
</td>
<td class="diff-line-num new_line" data-linenumber="1125" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1125
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC1125" class="line"> <span class="p">(</span><span class="k" style="font-weight: bold">let</span> <span class="p">((</span><span class="vg" style="color: teal">*ignore-wildcards*</span> <span class="no" style="color: teal">t</span><span class="p">))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" style="line-height: 1.5">
<td class="diff-line-num old_line" data-linenumber="1126" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1126
</td>
<td class="diff-line-num new_line" data-linenumber="1126" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1126
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC1126" class="line"> <span class="p">(</span><span class="nb" style="color: #0086b3">mapcar</span> <span class="nf" style="color: #900; font-weight: bold">#'</span><span class="p">(</span><span class="k" style="font-weight: bold">lambda</span> <span class="p">(</span><span class="nv" style="color: teal">name</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" style="line-height: 1.5">
<td class="diff-line-num old_line" data-linenumber="1127" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1127
</td>
<td class="diff-line-num new_line" data-linenumber="1127" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1127
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC1127" class="line"> <span class="p">(</span><span class="k" style="font-weight: bold">let</span> <span class="p">((</span><span class="nv" style="color: teal">name</span> <span class="p">(</span><span class="k" style="font-weight: bold">if</span> <span class="p">(</span><span class="nb" style="color: #0086b3">and</span> <span class="nv" style="color: teal">check-for-subdirs</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" style="line-height: 1.5">
<td class="diff-line-num old old_line" data-linenumber="1128" style="background: #f9d7dc; border-right-color: #fac5cd; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#f9d7dc">
1128
</td>
<td class="diff-line-num new_line old" data-linenumber="1128" style="background: #f9d7dc; border-right-color: #fac5cd; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#f9d7dc">
</td>
<td class="line_content noteable_line old" style="background: #fbe9eb; padding-left: 0.5em; padding-right: 0.5em" bgcolor="#fbe9eb">
<pre style="margin: 0"> <span id="LC1128" class="line"> <span class="p">(</span><span class="nb" style="color: #0086b3">eq</span> <span class="p">(</span><span class="nv" style="color: teal">unix:unix-file-kind</span> <span class="nv" style="color: teal">name</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" style="line-height: 1.5">
<td class="diff-line-num new old_line" data-linenumber="1129" style="background: #ddfbe6; border-right-color: #c7f0d2; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#ddfbe6">
</td>
<td class="diff-line-num new new_line" data-linenumber="1128" style="background: #ddfbe6; border-right-color: #c7f0d2; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#ddfbe6">
1128
</td>
<td class="line_content new noteable_line" style="background: #ecfdf0; padding-left: 0.5em; padding-right: 0.5em" bgcolor="#ecfdf0">
<pre style="margin: 0"> <span id="LC1128" class="line"> <span class="p">(</span><span class="nb" style="color: #0086b3">eq</span> <span class="p">(</span><span class="nv" style="color: teal">unix:unix-file-kind</span> <span class="nv" style="color: teal">name</span><span class="idiff left"> </span><span class="p"><span class="idiff">(</span></span><span class="nb" style="color: #0086b3"><span class="idiff">not</span></span><span class="idiff"> </span><span class="nv" style="color: teal"><span class="idiff">follow-links</span></span><span class="p"><span class="idiff right">)</span>)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" style="line-height: 1.5">
<td class="diff-line-num old_line" data-linenumber="1129" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1129
</td>
<td class="diff-line-num new_line" data-linenumber="1129" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1129
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC1129" class="line"> <span class="ss" style="color: #990073">:directory</span><span class="p">))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" style="line-height: 1.5">
<td class="diff-line-num old_line" data-linenumber="1130" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1130
</td>
<td class="diff-line-num new_line" data-linenumber="1130" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1130
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC1130" class="line"> <span class="p">(</span><span class="nb" style="color: #0086b3">concatenate</span> <span class="ss" style="color: #990073">'string</span> <span class="nv" style="color: teal">name</span> <span class="s" style="color: #d14">"/"</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" style="line-height: 1.5">
<td class="diff-line-num old_line" data-linenumber="1131" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1131
</td>
<td class="diff-line-num new_line" data-linenumber="1131" style="background: #fafafa; border-right-color: #f0f0f0; border-right-style: solid; border-right-width: 1px; color: rgba(0,0,0,0.3); padding: 0 5px; text-align: right; width: 35px" align="right" bgcolor="#fafafa">
1131
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em">
<pre style="margin: 0"> <span id="LC1131" class="line"> <span class="nv" style="color: teal">name</span><span class="p">)))</span></span>
</pre>
</td>
</tr>
</table>
<br>
</li>
</div>
<div class="footer" style="margin-top: 10px">
<p style="color: #777; font-size: small">
—
<br>
<a href="https://gitlab.common-lisp.net/cmucl/cmucl/compare/3d18025d13e030958e44641c7c4cec18408831cc...4bf2062f18694d662f79d25c04989f61eab87460">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.common-lisp.net.
If you'd like to receive fewer emails, you can
adjust your notification settings.
</p>
</div>
</body>
</html>