SCP issues.
This commit is contained in:
parent
c5c328b303
commit
fb904806c1
|
@ -854,12 +854,10 @@ int
|
||||||
w32_ftruncate(int fd, off_t length) {
|
w32_ftruncate(int fd, off_t length) {
|
||||||
CHECK_FD(fd);
|
CHECK_FD(fd);
|
||||||
|
|
||||||
|
if (!SetFilePointer(w32_fd_to_handle(fd), length, 0, FILE_BEGIN))
|
||||||
|
return -1;
|
||||||
if (!SetEndOfFile(w32_fd_to_handle(fd)))
|
if (!SetEndOfFile(w32_fd_to_handle(fd)))
|
||||||
return -1;
|
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;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue