Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • cmucl cmucl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cmucl
  • cmuclcmucl
  • Merge requests
  • !15

The source project of this merge request has been removed.
Merged
Created Sep 28, 2016 by Elias Pipping@epippingContributor

Fix: directory followed symlinks with :follow-links nil

  • Overview 6
  • Changes 1

I'm on Linux. I'm looking at a directory that contains both physical directories and symbolic links to directories.

What I would expect:

(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.

(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.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master