mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-25 15:04:54 +02:00
Temporary fixes to scp.exe and sftp.exe to work if started from any directory. Currently they only work if started from their root directory
This commit is contained in:
parent
74db643add
commit
0a91579b94
4
scp.c
4
scp.c
@ -3082,6 +3082,10 @@ int start_process_io(char *exename, char **argv, char **envv,
|
|||||||
|
|
||||||
ctr = 0;
|
ctr = 0;
|
||||||
cmdbuf[0] = '\0';
|
cmdbuf[0] = '\0';
|
||||||
|
if (argv[0][0] != '\0' && argv[0][1] != ':') {
|
||||||
|
strcat(cmdbuf, w32_programdir());
|
||||||
|
strcat(cmdbuf, "\\");
|
||||||
|
}
|
||||||
while (argv[ctr]) {
|
while (argv[ctr]) {
|
||||||
strcat_s(cmdbuf, sizeof(cmdbuf), argv[ctr]);
|
strcat_s(cmdbuf, sizeof(cmdbuf), argv[ctr]);
|
||||||
strcat_s(cmdbuf, sizeof(cmdbuf), " ");
|
strcat_s(cmdbuf, sizeof(cmdbuf), " ");
|
||||||
|
5
sftp.c
5
sftp.c
@ -2219,6 +2219,11 @@ connect_to_server(char *path, char **args, int *in, int *out)
|
|||||||
STARTUPINFO si = { 0 };
|
STARTUPINFO si = { 0 };
|
||||||
|
|
||||||
debug3("Generating ssh-client command...");
|
debug3("Generating ssh-client command...");
|
||||||
|
fullCmd[0] = '\0';
|
||||||
|
if (path[0] != '\0' && path[1] != ':') {
|
||||||
|
strncat(fullCmd, w32_programdir(), MAX_PATH);
|
||||||
|
strncat(fullCmd, "\\", MAX_PATH);
|
||||||
|
}
|
||||||
strncat(fullCmd, path, MAX_PATH);
|
strncat(fullCmd, path, MAX_PATH);
|
||||||
for (i = 1; args[i]; i++)
|
for (i = 1; args[i]; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user