Skip to content
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

test -e fails on (healthy) symlink #46

Closed
xparq opened this issue Jan 27, 2023 · 5 comments
Closed

test -e fails on (healthy) symlink #46

xparq opened this issue Jan 27, 2023 · 5 comments

Comments

@xparq
Copy link

xparq commented Jan 27, 2023

$ pwd
C:/sz/prj/Args/test

$ busybox test -e tmp/symlink && echo ok
ok
$ test -e tmp/symlink && echo ok

:-o

$ which busybox
C:/SW/devel/tool/w64devkit/w64devkit-32/bin/busybox.exe
$ which test
test

But wait, there's more:

$ cd tmp && test -e symlink && echo ok
ok

:-oo

$ readlink symlink
C:/sz/prj/Args/test/tmp/README.out
$ test -f README.out && echo ok
ok

Any idea, what can cause this?

@rmyorston
Copy link

Any idea, what can cause this?

I thought so, but it doesn't match your report.

There was a bug in the last commit before the FRP-4716 release (which is the version used in w64devkit 1.17.0). It was later fixed. But that related to relative symlinks, an absolute symlink should be OK.

I can reproduce your problem in w64devkit if the symlink is relative but not if it's absolute.

@skeeto
Copy link
Owner

skeeto commented Jan 28, 2023 via email

@xparq
Copy link
Author

xparq commented Jan 29, 2023

Thank you, guys. At the moment I'm also unable to reproduce it. :-o (With new files, as that previous tmp dir was gone.)

BTW, sh was just the default shell launched by my w64devkit shortcut, via C:\SW\devel\tool\w64devkit\w64devkit-32\w64devkit.exe. (Vanilla Win10/64 here.)

Git's shell is also on the path, FWIW, but it comes later (line-breaks added for easier reading):

$ echo $PATH
C:/SW/devel/tool/w64devkit/w64devkit-32/bin;
C:/Windows/system32;C:/Windows;
C:/Windows/System32/Wbem;
C:/Windows/System32/WindowsPowerShell/v1.0/;
C:/Windows/System32/OpenSSH/;
C:/Program Files (x86)/Bitvise SSH Client;
C:/Program Files/Git/cmd;
C:/Program Files/Git/mingw64/bin;
C:/Program Files/Git/usr/bin;
C:/Program Files (x86)/VSCodium/bin;
C:/Program Files (x86)/GitExtensions/;
C:/Program Files/dotnet/;
C:/Program Files/GitHub CLI/;
<... presumably irrelevant additional entries ...>

@xparq
Copy link
Author

xparq commented Mar 24, 2023

I'm closing this "tentatively", as nobody else seems to have had anything similar apparently, and even I don't have it any more... And it feels so bad to have this crosshair on your nice project. :)

@xparq xparq closed this as completed Mar 24, 2023
@xparq
Copy link
Author

xparq commented Mar 24, 2023

Wait, I even found a typo in the original report, which I have now fixed, retrospectively... I have no idea now if that could have been the actual cause of the anomaly, as originally I noticed the problem in a different context (a script misbehaving), where there was no such typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants