X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxsftp.c;h=a9fb9cb329cd65642aae2e12c2227f5607c54f26;hb=095072fa46b2d7b8beafaddb2f873d2f500a1e10;hp=7039b69b5c2d1ace1663b0c00a529a03ee5a449e;hpb=b5423b51d468b76eb2b6cd19bb2c900b882e24f3;p=PuTTY.git diff --git a/unix/uxsftp.c b/unix/uxsftp.c index 7039b69b..a9fb9cb3 100644 --- a/unix/uxsftp.c +++ b/unix/uxsftp.c @@ -413,6 +413,20 @@ void finish_wildcard_matching(WildcardMatcher *dir) { sfree(dir); } +char *stripslashes(const char *str, int local) +{ + char *p; + + /* + * On Unix, we do the same thing regardless of the 'local' + * parameter. + */ + p = strrchr(str, '/'); + if (p) str = p+1; + + return (char *)str; +} + int vet_filename(const char *name) { if (strchr(name, '/')) @@ -517,7 +531,9 @@ static int ssh_sftp_do_select(int include_stdin, int no_fds_ok) now = GETTICKCOUNT(); } while (ret < 0 && errno == EINTR); } else { - ret = select(maxfd, &rset, &wset, &xset, NULL); + do { + ret = select(maxfd, &rset, &wset, &xset, NULL); + } while (ret < 0 && errno == EINTR); } } while (ret == 0); @@ -604,6 +620,8 @@ char *ssh_sftp_get_cmdline(const char *prompt, int no_fds_ok) void frontend_net_error_pending(void) {} +void platform_psftp_post_option_setup(void) {} + /* * Main program: do platform-specific initialisation and then call * psftp_main().