Skip to content

Commit 39c00bf

Browse files
committed
Fix sftp-server to have process_setstat() work correctly in Win32
This fix allows WinSCP upload to finish properly as updating time was not working otherwise with driver letter support improvement. Other sftp clients will also work better/properly now.
1 parent 332890c commit 39c00bf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sftp-server.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,14 @@ process_setstat(u_int32_t id)
10231023

10241024
if ((r = sshbuf_get_cstring(iqueue, &name, NULL)) != 0 )
10251025
fatal("%s: buffer error: %s", __func__, ssh_err(r));
1026+
#ifdef WIN32_FIXME
1027+
char resolvedname[MAXPATHLEN];
1028+
if (realpathWin32i(name, resolvedname))
1029+
{
1030+
free(name);
1031+
name = strdup(resolvedname);
1032+
}
1033+
#endif
10261034

10271035
if ((r = decode_attrib(iqueue, &a)) != 0)
10281036
fatal("%s: buffer error: %s", __func__, ssh_err(r));

0 commit comments

Comments
 (0)