Skip to content

Add openssh sftp-server path detection for windows #38

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

Merged
merged 1 commit into from
Jul 4, 2022

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Jul 3, 2022

Unfortunately LookPath doesn't handle DOS extensions.

But it was already confused by the / location anyway.

i.e. LookPath("/usr/lib/openssh/sftp-server") fails

Even though the Windows program works fine to execute.


Testing on Ubuntu:

$ export WINEPATH="C:\\Program Files\\qemu;C:\\Program Files\\Git\\usr\\bin"
$ wine cygpath -w /usr/lib/ssh/sftp-server | cat
Cygwin WARNING:
  Couldn't compute FAST_CWD pointer.  This typically occurs if you're using
  an older Cygwin version on a newer Windows.  Please update to the latest
  available Cygwin version from https://cygwin.com/.  If the problem persists,
  please see https://cygwin.com/problems.html

C:\Program Files\Git\usr\lib\ssh\sftp-server.exe

Spaces and carriage returns, oh my.

I had first installed Git for Windows

Unfortunately LookPath doesn't handle DOS extensions.

But it was already confused by the / location anyway.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 788409c into lima-vm:master Jul 4, 2022
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.

2 participants