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

Diff for /src/usr.bin/ssh/scp.c between version 1.233 and 1.234

version 1.233, 2021/09/08 23:31:39 version 1.234, 2021/09/11 00:40:24
Line 619 
Line 619 
          * Finally check the exit status of the ssh process, if one was forked           * Finally check the exit status of the ssh process, if one was forked
          * and no error has occurred yet           * and no error has occurred yet
          */           */
         if (do_cmd_pid != -1 && errs == 0) {          if (do_cmd_pid != -1 && (mode == MODE_SFTP || errs == 0)) {
                 if (remin != -1)                  if (remin != -1)
                     (void) close(remin);                      (void) close(remin);
                 if (remout != -1)                  if (remout != -1)
Line 1263 
Line 1263 
         if (local_is_dir(src) && iamrecursive) {          if (local_is_dir(src) && iamrecursive) {
                 if (upload_dir(conn, src, abs_dst, pflag,                  if (upload_dir(conn, src, abs_dst, pflag,
                     SFTP_PROGRESS_ONLY, 0, 0, 1) != 0) {                      SFTP_PROGRESS_ONLY, 0, 0, 1) != 0) {
                         fatal("failed to upload directory %s to %s",                          error("failed to upload directory %s to %s",
                                 src, abs_dst);                                  src, abs_dst);
                           errs = 1;
                 }                  }
         } else if (do_upload(conn, src, abs_dst, pflag, 0, 0) != 0)          } else if (do_upload(conn, src, abs_dst, pflag, 0, 0) != 0) {
                 fatal("failed to upload file %s to %s", src, abs_dst);                  error("failed to upload file %s to %s", src, abs_dst);
                   errs = 1;
           }
   
         free(abs_dst);          free(abs_dst);
         free(target);          free(target);
Line 1505 
Line 1508 
         free(tmp);          free(tmp);
         globfree(&g);          globfree(&g);
         if (err == -1) {          if (err == -1) {
                 fatal("Failed to download file '%s'", src);                  error("Failed to download '%s'", src);
                   errs = 1;
         }          }
 }  }
   

Legend:
Removed from v.1.233  
changed lines
  Added in v.1.234