SCP issues.
This commit is contained in:
parent
c5c328b303
commit
fb904806c1
|
@ -854,12 +854,10 @@ int
|
|||
w32_ftruncate(int fd, off_t length) {
|
||||
CHECK_FD(fd);
|
||||
|
||||
if (!SetFilePointer(w32_fd_to_handle(fd), length, 0, FILE_BEGIN))
|
||||
return -1;
|
||||
if (!SetEndOfFile(w32_fd_to_handle(fd)))
|
||||
return -1;
|
||||
if (!SetFileValidData(w32_fd_to_handle(fd), length))
|
||||
return -1;
|
||||
if (!SetFilePointer(w32_fd_to_handle(fd), 0, 0, FILE_BEGIN))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
7
scp.c
7
scp.c
|
@ -919,6 +919,11 @@ main(int argc, char **argv)
|
|||
extern int optind;
|
||||
|
||||
#ifdef WINDOWS
|
||||
/*
|
||||
* Initialize I/O wrappers.
|
||||
*/
|
||||
|
||||
w32posix_initialize();
|
||||
ConInit(STD_OUTPUT_HANDLE, TRUE);
|
||||
#endif
|
||||
|
||||
|
@ -1079,7 +1084,7 @@ main(int argc, char **argv)
|
|||
exit(errs != 0);
|
||||
}
|
||||
if (tflag) {
|
||||
/* Receive data. */
|
||||
/* Receive data. */
|
||||
sink(argc, argv);
|
||||
exit(errs != 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue