8000 Symlinks cause weirdness related to trailing slash · Issue #1775 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Symlinks cause weirdness related to trailing slash #1775

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
halr9000 opened this issue Aug 12, 2016 · 8 comments
Closed

Symlinks cause weirdness related to trailing slash #1775

halr9000 opened this issue Aug 12, 2016 · 8 comments
Assignees
Labels
Issue-Bug Issue has been identified as a bug in the product OS-macOS Resolution-Fixed The issue is fixed. WG-Cmdlets general cmdlet issues

Comments

@halr9000
Copy link
Contributor

I found that tab expansion doesn't work in a symlinked folder. Investigation found that the shell can't see ANY items in the $PWD, but /something/ causes things to right themselves in the same session.

Steps to reproduce

cd /tmp
mkdir test1
mkdir test1/foo
mkdir test1/bar
ln -s test1 test2 # using /bin/ln here
dir test1 # "case A"
dir test2 # "case B"

Expected behavior

Output from case A should equal case B, but the "Directory name" should read "/tmp/test2".

Actual behavior

Case B shows only the file entry of the symlink. That would be ok in some cases, HOWEVER what you see is that this behavior affects lots of things like tab expansion. For example, to continue repro:

cd test2
cd [TAB] # nothing happens with any tab completion commands here

Note that you can get around some of the issues by manually appending a forward-slash. e.g. dir test2/.

Environment data

OSX 10.11.6

Name                           Value                                                                                     
----                           -----                                                                                     
PSVersion                      6.0.0-alpha                                                                               
PSEdition                      Core                                                                                      
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                   
BuildVersion                   3.0.0.0                                                                                   
GitCommitId                    v6.0.0-alpha.8                                                                            
CLRVersion                                                                                                               
WSManStackVersion              3.0                                                                                       
PSRemotingProtocolVersion      2.3                                                                                       
SerializationVersion           1.1.0.1         
@halr9000
Copy link
Contributor Author

I should add that after some poking around, sometimes the problem seems to resolve itself. I have not yet figured out what is happening to cause this.

@andyleejordan andyleejordan added the Issue-Bug Issue has been identified as a bug in the product label Aug 17, 2016
@andyleejordan
Copy 8000 link
Member

Agreed; bug reproduces. Listing the symlink should not require a trailing slash.

@SteveL-MSFT SteveL-MSFT added this to the 6.0.0 milestone Sep 29, 2016
@SteveL-MSFT SteveL-MSFT added the WG-Cmdlets general cmdlet issues label Sep 29, 2016
@SteveL-MSFT SteveL-MSFT modified the milestones: 6.0.0-beta, 6.0.0 Dec 19, 2016
@joeyaiello
Copy link
Contributor

This may be related to #2865

@SteveL-MSFT SteveL-MSFT assigned anmenaga and jeffbi and unassigned anmenaga Mar 22, 2017
@SteveL-MSFT SteveL-MSFT assigned chunqingchen and unassigned jeffbi Apr 19, 2017
@SteveL-MSFT
Copy link
Member

@chunqingchen can you validate if your PR for the related issue fixes this and if we need to add a test case for this issue?

@SteveL-MSFT
Copy link
Member
SteveL-MSFT commented Apr 26, 2017

See if #2974 fixes this

@SteveL-MSFT SteveL-MSFT modified the milestones: 6.0.0-beta, 6.0.0-beta1 May 2, 2017
@SteveL-MSFT
Copy link
Member

Still repros with #2974

@SteveL-MSFT SteveL-MSFT modified the milestones: 6.0.0-beta, 6.0.0 May 15, 2017
@chunqingchen
Copy link
Contributor
chunqingchen commented May 18, 2017

@SteveL-MSFT @joeyaiello
I used to be able to repro it on ubunto 14.04
Now I test the scenario on both macos 10.12.4 and ubunto 16.04 and it passes. (Thanks to my machine crash i have to reinstall everything)

It seems this bug is OS version related but not powershell version related (the default powershell installed from ./tools/download.sh also passes).

Shall we set this bug as not repro?

@SteveL-MSFT SteveL-MSFT added the Resolution-Fixed The issue is fixed. label May 18, 2017
@SteveL-MSFT
Copy link
Member

This isn't repro'ing for me with beta1. Looks like it was fixed with another change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Issue has been identified as a bug in the product OS-macOS Resolution-Fixed The issue is fixed. WG-Cmdlets general cmdlet issues
Projects
None yet
Development

No branches or pull requests

7 participants
0