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

Support symlinked executables on Windows #25

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

charlespierce
Copy link
Contributor

Info

The fix to support Windows Reparse Points in #23 inadvertently resulted in actual Windows symlinks being skipped. Since fs::symlink_metadata doesn't traverse symlinks, calling it on a symlink will result in is_file being false, cause which to incorrectly ignore the symlink.

Changes

  • Added an additional check for is_symlink in the Windows branch of the ExistedChecker, which correctly includes actual symlinks as well as potentially executable.

Tested

  • Created a symlink to a .exe file locally (following these steps) and confirmed that this change can detect the linked executable.
  • Created a symlink to a directory and confirmed that which still correctly detects directories aren't executable.

Note

@fdncred
Copy link
Contributor

fdncred commented Aug 4, 2020

@harryfei when you get a chance, can you please look at this?

@harryfei
Copy link
Owner

harryfei commented Aug 4, 2020

Sorry, I missed this PR.

@charlespierce
Copy link
Contributor Author

@harryfei I dont think this is a breaking change. This behavior worked as expected in 4.0.0 and regressed in 4.0.1, so this is a bug fix for that regression.

@harryfei harryfei merged commit 5dad17e into harryfei:master Aug 4, 2020
@harryfei
Copy link
Owner

harryfei commented Aug 4, 2020

I will publish the new version.

@fdncred
Copy link
Contributor

fdncred commented Aug 4, 2020

Thanks @harryfei !!!

@fdncred
Copy link
Contributor

fdncred commented Aug 7, 2020

@harryfei Can I ask when you plan to publish this new version?

@harryfei
Copy link
Owner

@fdncred Done already. 😄

@fdncred
Copy link
Contributor

fdncred commented Aug 10, 2020

@harryfei I'm confused. I just see 4.0.1 in your releases on GH. What am I missing?

@harryfei
Copy link
Owner

harryfei commented Aug 10, 2020

@fdncred Yeah, I released 4.0.2 on crates.io. Just forget to create 4.0.2 tag on GH. 😄

@fdncred
Copy link
Contributor

fdncred commented Aug 10, 2020

oh, ok. thanks!

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

Successfully merging this pull request may close these issues.

3 participants