Skip to content

ls resolves a symlink which pointed to a file #6706

Closed

Description

@nibon7

Describe the bug

E.g. there are a file and a symlink which pointed to the file, ls * or just ls, the type of the symlink is symlink, but ls <NAME_OF_THE_SYMLINK>, the type of the symlink is file.

How to reproduce

  1. mkdir test
  2. cd test
  3. touch a_file
  4. ln -s a_file a_symlink
  5. ls | where name == a_symlink | get type
  6. ls a_symlink | get type

Expected behavior

ls does not resolve a symlink which pointed to a file

Screenshots

Screenshot from 2022-10-12 08-28-12

Configuration

key value
version 0.69.2
branch main
commit_hash 118033e
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.64.0 (gentoo)
cargo_version cargo 1.64.0
pkg_version 0.69.2
build_time 2022-10-10 08:43:05 +08:00
build_rust_channel release
features default, trash, which, zip
installed_plugins

Additional context

No response

Activity

  1. fdncred commented on Oct 12, 2022

    @fdncred
    Contributor

    it seems like we had a PR recently which changed the way ls and symlinks work. You might want to look into that to see what changed.

  2. added
    A:file-system
    on Oct 12, 2022
  3. added a commit that references this issue on Mar 20, 2023
    77e73ce
  4. added this to the v0.78.0 milestone on Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:file-system

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions