10000 Get-ChildItem doesn't treat directory symlinks as directories on Unix · Issue #3723 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Get-ChildItem doesn't treat directory symlinks as directories on Unix #3723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mklement0 opened this issue May 7, 2017 · 2 comments
Closed
Labels
Resolution-Duplicate The issue is a duplicate. WG-Engine-Providers built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

Comments

@mklement0
Copy link
Contributor

Note: Applies to Linux and macOS, not Windows.

In most contexts, a symlink to a directory should be treated as a directory.

Get-ChildItem on Unix platform currently treats directory symlinks as files, and therefore doesn't show their contents.

Steps to reproduce (run on a Unix platform)

# Create symlink 'tmpl' to directory '/tmp' in the current dir.
ln -s /tmp tmpl
# Pass the directory symlink to Get-ChildItem
Get-ChildItem tmpl 

Expected behavior

A listing of the contents of directory /tmp

Actual behavior

Something like the following is output; i.e., information about the symlink itself, not its target's contents:

    Directory: /Users/jdoe


Mode                LastWriteTime         Length Name                                                                                                                              
----                -------------         ------ ----                                                                                                                              
d----l           5/7/17   2:35 PM                tmpl                                                                                                                              

Environment data

PowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on macOS 10.12.4
@iSazonov
Copy link
Collaborator
iSazonov commented May 7, 2017

It is duplicate #1958 and fixed by @jeffbi in #3697

@mklement0
Copy link
Contributor Author

@iSazonov Glad to hear it; thanks for letting me know.

@iSazonov iSazonov added WG-Engine-Providers built-in PowerShell providers such as FileSystem, Certificates, Registry, etc. Resolution-Duplicate The issue is a duplicate. labels May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate The issue is a duplicate. WG-Engine-Providers built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.
Projects
None yet
Development

No branches or pull requests

2 participants
0