diff options
Diffstat (limited to 'sftp-int.c')
-rw-r--r-- | sftp-int.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sftp-int.c b/sftp-int.c index bc5cce8de..4c280b492 100644 --- a/sftp-int.c +++ b/sftp-int.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* XXX: recursive operations */ | 25 | /* XXX: recursive operations */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: sftp-int.c,v 1.64 2003/11/08 19:17:29 jmc Exp $"); | 28 | RCSID("$OpenBSD: sftp-int.c,v 1.65 2003/11/21 11:57:03 djm Exp $"); |
29 | 29 | ||
30 | #include "buffer.h" | 30 | #include "buffer.h" |
31 | #include "xmalloc.h" | 31 | #include "xmalloc.h" |
@@ -361,7 +361,7 @@ get_pathname(const char **cpp, char **path) | |||
361 | } | 361 | } |
362 | if (cp[i] == '\\') { /* Escaped characters */ | 362 | if (cp[i] == '\\') { /* Escaped characters */ |
363 | i++; | 363 | i++; |
364 | if (cp[i] != '\'' && cp[i] != '\"' && | 364 | if (cp[i] != '\'' && cp[i] != '\"' && |
365 | cp[i] != '\\') { | 365 | cp[i] != '\\') { |
366 | error("Bad escaped character '\%c'", | 366 | error("Bad escaped character '\%c'", |
367 | cp[i]); | 367 | cp[i]); |
@@ -389,7 +389,7 @@ get_pathname(const char **cpp, char **path) | |||
389 | return (0); | 389 | return (0); |
390 | 390 | ||
391 | fail: | 391 | fail: |
392 | xfree(*path); | 392 | xfree(*path); |
393 | *path = NULL; | 393 | *path = NULL; |
394 | return (-1); | 394 | return (-1); |
395 | } | 395 | } |
@@ -530,7 +530,7 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) | |||
530 | 530 | ||
531 | for (i = 0; g.gl_pathv[i]; i++) { | 531 | for (i = 0; g.gl_pathv[i]; i++) { |
532 | if (!is_reg(g.gl_pathv[i])) { | 532 | if (!is_reg(g.gl_pathv[i])) { |
533 | error("skipping non-regular file %s", | 533 | error("skipping non-regular file %s", |
534 | g.gl_pathv[i]); | 534 | g.gl_pathv[i]); |
535 | continue; | 535 | continue; |
536 | } | 536 | } |
@@ -598,7 +598,7 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag) | |||
598 | for (n = 0; d[n] != NULL; n++) | 598 | for (n = 0; d[n] != NULL; n++) |
599 | m = MAX(m, strlen(d[n]->filename)); | 599 | m = MAX(m, strlen(d[n]->filename)); |
600 | 600 | ||
601 | if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) | 601 | if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) |
602 | width = ws.ws_col; | 602 | width = ws.ws_col; |
603 | 603 | ||
604 | columns = width / (m + 2); | 604 | columns = width / (m + 2); |
@@ -668,7 +668,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, | |||
668 | strncmp(path, g.gl_pathv[0], strlen(g.gl_pathv[0]) - 1) == 0) { | 668 | strncmp(path, g.gl_pathv[0], strlen(g.gl_pathv[0]) - 1) == 0) { |
669 | if ((a = do_lstat(conn, path, 1)) == NULL) { | 669 | if ((a = do_lstat(conn, path, 1)) == NULL) { |
670 | globfree(&g); | 670 | globfree(&g); |
671 | return (-1); | 671 | return (-1); |
672 | } | 672 | } |
673 | if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) && | 673 | if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) && |
674 | S_ISDIR(a->perm)) { | 674 | S_ISDIR(a->perm)) { |
@@ -682,7 +682,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, | |||
682 | struct winsize ws; | 682 | struct winsize ws; |
683 | 683 | ||
684 | /* Count entries for sort and find longest filename */ | 684 | /* Count entries for sort and find longest filename */ |
685 | for (i = 0; g.gl_pathv[i]; i++) | 685 | for (i = 0; g.gl_pathv[i]; i++) |
686 | m = MAX(m, strlen(g.gl_pathv[i])); | 686 | m = MAX(m, strlen(g.gl_pathv[i])); |
687 | 687 | ||
688 | if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) | 688 | if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) |