[BACK]Return to sftp-client.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sftp-client.c between version 1.152 and 1.153

version 1.152, 2021/08/07 01:55:01 version 1.153, 2021/08/09 07:16:09
Line 1350 
Line 1350 
         return 0;          return 0;
 }  }
   
   static const char *
   progress_meter_path(const char *path)
   {
           const char *progresspath;
   
           if ((progresspath = strrchr(path, '/')) == NULL)
                   return path;
           progresspath++;
           if (*progresspath == '\0')
                   return path;
           return progresspath;
   }
   
 int  int
 do_download(struct sftp_conn *conn, const char *remote_path,  do_download(struct sftp_conn *conn, const char *remote_path,
     const char *local_path, Attrib *a, int preserve_flag, int resume_flag,      const char *local_path, Attrib *a, int preserve_flag, int resume_flag,
Line 1433 
Line 1446 
         max_req = 1;          max_req = 1;
         progress_counter = offset;          progress_counter = offset;
   
         if (showprogress && size != 0)          if (showprogress && size != 0) {
                 start_progress_meter(remote_path, size, &progress_counter);                  start_progress_meter(progress_meter_path(remote_path),
                       size, &progress_counter);
           }
   
         if ((msg = sshbuf_new()) == NULL)          if ((msg = sshbuf_new()) == NULL)
                 fatal_f("sshbuf_new failed");                  fatal_f("sshbuf_new failed");
Line 1820 
Line 1835 
   
         /* Read from local and write to remote */          /* Read from local and write to remote */
         offset = progress_counter = (resume ? c->size : 0);          offset = progress_counter = (resume ? c->size : 0);
         if (showprogress)          if (showprogress) {
                 start_progress_meter(local_path, sb.st_size,                  start_progress_meter(progress_meter_path(local_path),
                     &progress_counter);                      sb.st_size, &progress_counter);
           }
   
         if ((msg = sshbuf_new()) == NULL)          if ((msg = sshbuf_new()) == NULL)
                 fatal_f("sshbuf_new failed");                  fatal_f("sshbuf_new failed");
Line 2178 
Line 2194 
         max_req = 1;          max_req = 1;
         progress_counter = 0;          progress_counter = 0;
   
         if (showprogress && size != 0)          if (showprogress && size != 0) {
                 start_progress_meter(from_path, size, &progress_counter);                  start_progress_meter(progress_meter_path(from_path),
                       size, &progress_counter);
           }
         if ((msg = sshbuf_new()) == NULL)          if ((msg = sshbuf_new()) == NULL)
                 fatal_f("sshbuf_new failed");                  fatal_f("sshbuf_new failed");
         while (num_req > 0 || max_req > 0) {          while (num_req > 0 || max_req > 0) {

Legend:
Removed from v.1.152  
changed lines
  Added in v.1.153