Bugzilla – Attachment 3284 Details for
Bug 2978
download status file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Print "not modified" message when resumed transfer does not modify files
bz2978.diff (text/plain), 1.26 KB, created by
Damien Miller
on 2019-05-17 14:22:54 AEST
(
hide
)
Description:
Print "not modified" message when resumed transfer does not modify files
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2019-05-17 14:22:54 AEST
Size:
1.26 KB
patch
obsolete
>diff --git a/sftp-client.c b/sftp-client.c >index 73e3c2f5..85c59f44 100644 >--- a/sftp-client.c >+++ b/sftp-client.c >@@ -1203,7 +1203,7 @@ do_download(struct sftp_conn *conn, const char *remote_path, > struct sshbuf *msg; > u_char *handle; > int local_fd = -1, write_error; >- int read_error, write_errno, reordered = 0, r; >+ int read_error, write_errno, lmodified = 0, reordered = 0, r; > u_int64_t offset = 0, size, highwater; > u_int mode, id, buflen, num_req, max_req, status = SSH2_FX_OK; > off_t progress_counter; >@@ -1373,6 +1373,7 @@ do_download(struct sftp_conn *conn, const char *remote_path, > if (len > req->len) > fatal("Received more data than asked for " > "%zu > %zu", len, req->len); >+ lmodified = 1; > if ((lseek(local_fd, req->offset, SEEK_SET) == -1 || > atomicio(vwrite, local_fd, data, len) != len) && > !write_error) { >@@ -1476,7 +1477,9 @@ do_download(struct sftp_conn *conn, const char *remote_path, > error("Can't set times on \"%s\": %s", > local_path, strerror(errno)); > } >- if (fsync_flag) { >+ if (resume_flag && !lmodified) >+ logit("File \"%s\" was not modified", local_path); >+ else if (fsync_flag) { > debug("syncing \"%s\"", local_path); > if (fsync(local_fd) == -1) > error("Couldn't sync file \"%s\": %s",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2978
: 3284