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

Diff for /src/usr.bin/ssh/Attic/sftp-int.c between version 1.54 and 1.55

version 1.54, 2003/01/13 11:04:04 version 1.55, 2003/01/14 10:58:00
Line 383 
Line 383 
 }  }
   
 static int  static int
   is_reg(char *path)
   {
           struct stat sb;
   
           if (stat(path, &sb) == -1)
                   fatal("stat %s: %s", path, strerror(errno));
   
           return(S_ISREG(sb.st_mode));
   }
   
   static int
 remote_is_dir(struct sftp_conn *conn, char *path)  remote_is_dir(struct sftp_conn *conn, char *path)
 {  {
         Attrib *a;          Attrib *a;
Line 496 
Line 507 
   
         /* Only one match, dst may be file, directory or unspecified */          /* Only one match, dst may be file, directory or unspecified */
         if (g.gl_pathv[0] && g.gl_matchc == 1) {          if (g.gl_pathv[0] && g.gl_matchc == 1) {
                   if (!is_reg(g.gl_pathv[i])) {
                           error("Can't upload %s: not a regular file",
                               g.gl_pathv[0]);
                           err = 1;
                           goto out;
                   }
                 if (tmp_dst) {                  if (tmp_dst) {
                         /* If directory specified, append filename */                          /* If directory specified, append filename */
                         if (remote_is_dir(conn, tmp_dst)) {                          if (remote_is_dir(conn, tmp_dst)) {
Line 527 
Line 544 
         }          }
   
         for (i = 0; g.gl_pathv[i]; i++) {          for (i = 0; g.gl_pathv[i]; i++) {
                   if (!is_reg(g.gl_pathv[i])) {
                           error("skipping non-regular file %s",
                               g.gl_pathv[i]);
                           continue;
                   }
                 if (infer_path(g.gl_pathv[i], &tmp)) {                  if (infer_path(g.gl_pathv[i], &tmp)) {
                         err = -1;                          err = -1;
                         goto out;                          goto out;

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55