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

Cannot recognize symbolic links on Windows #10326

Closed
endereyewxy opened this issue Apr 10, 2024 · 2 comments · Fixed by #10339
Closed

Cannot recognize symbolic links on Windows #10326

endereyewxy opened this issue Apr 10, 2024 · 2 comments · Fixed by #10339
Labels
C-bug Category: This is a bug
Milestone

Comments

@endereyewxy
Copy link

Summary

File pickers and :open cannot recognize symbolic links. :write simply overwites them.

Reproduction Steps

I tried this:

  1. Create symbolic linked files:

    New-Item a.txt
    New-Item -Type SymbolicLink -Target b.txt -Path .\a.txt

    This should create an empty a.txt and a symbolic link b.txt under the current working directory.

  2. hx

  3. :open b.txt

  4. Type something, and then :write

I expected this to happen:

As b.txt is a symbolic link to a.txt, modifications should apply to both files.

Instead, this happened:

The original symbolic link is overwritten, and b.txt is now a normal file. a.txt remains unchanged. BTW, the file picker won't recognize b.txt at the beginning.

Helix log

Nothing interesting in the logs.

Platform

Windows

Terminal Emulator

Windows Terminal

Installation Method

source

Helix Version

24.03-121-g35d0ae7c

@endereyewxy endereyewxy added the C-bug Category: This is a bug label Apr 10, 2024
@woojiq
Copy link
Contributor

woojiq commented Apr 10, 2024

This may be a regression/side effect of #9330 :|

@pascalkuthe
Copy link
Member

pascalkuthe commented Apr 10, 2024

Not really, normally writes to symolik links are handeled transparently by the OS.

This is a regression caused by #9236. @kirawi I think you need to cannonicalizing before writing the file, same issue may even occur on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants