Skip to content

Add openssh sftp-server path detection for windows#38

Merged
AkihiroSuda merged 1 commit into
lima-vm:masterfrom
afbjorklund:cygpath-windows
Jul 4, 2022
Merged

Add openssh sftp-server path detection for windows#38
AkihiroSuda merged 1 commit into
lima-vm:masterfrom
afbjorklund:cygpath-windows

Conversation

@afbjorklund

@afbjorklund afbjorklund commented Jul 3, 2022

Copy link
Copy Markdown
Member

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>

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

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