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

Diff for /src/usr.bin/ssh/sftp.c between version 1.138 and 1.139

version 1.138, 2012/09/18 10:36:12 version 1.139, 2012/09/21 10:53:07
Line 1675 
Line 1675 
 {  {
         glob_t g;          glob_t g;
         char *tmp, *tmp2, ins[3];          char *tmp, *tmp2, ins[3];
         u_int i, hadglob, pwdlen, len, tmplen, filelen;          u_int i, hadglob, pwdlen, len, tmplen, filelen, isabs;
         const LineInfo *lf;          const LineInfo *lf;
   
         /* Glob from "file" location */          /* Glob from "file" location */
Line 1684 
Line 1684 
         else          else
                 xasprintf(&tmp, "%s*", file);                  xasprintf(&tmp, "%s*", file);
   
           /* Check if the path is absolute. */
           isabs = tmp[0] == '/';
   
         memset(&g, 0, sizeof(g));          memset(&g, 0, sizeof(g));
         if (remote != LOCAL) {          if (remote != LOCAL) {
                 tmp = make_absolute(tmp, remote_path);                  tmp = make_absolute(tmp, remote_path);
Line 1718 
Line 1721 
                 goto out;                  goto out;
   
         tmp2 = complete_ambiguous(file, g.gl_pathv, g.gl_matchc);          tmp2 = complete_ambiguous(file, g.gl_pathv, g.gl_matchc);
         tmp = path_strip(tmp2, remote_path);          tmp = path_strip(tmp2, isabs ? NULL : remote_path);
         xfree(tmp2);          xfree(tmp2);
   
         if (tmp == NULL)          if (tmp == NULL)

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139