Mercurial > gftp.yaz
diff lib/cache.c @ 179:8d933999bba6
2003-6-14 Brian Masney <masneyb@gftp.org>
* lib/cache.c (gftp_delete_cache_entry) - fix for restoring newlines
* lib/gftp.h lib/protocols.c - added EOF flag for gftp_get_line()
* lib/gftp.h lib/pty.c - added get_pty_impl() function for each PTY
type
* src/text/gftp-text.c - after removing files, clear the cache for
that directory
author | masneyb |
---|---|
date | Sat, 14 Jun 2003 14:14:01 +0000 |
parents | c505d9ba9d53 |
children | 33b394ebba68 |
line wrap: on
line diff
--- a/lib/cache.c Wed Jun 11 22:02:26 2003 +0000 +++ b/lib/cache.c Sat Jun 14 14:14:01 2003 +0000 @@ -324,15 +324,15 @@ unlink (centry.file); else { - /* Make sure when we call gftp_get_line() that we pass the read size - as sizeof(buf) - 1 so that we'll have room to put the newline */ - buf[strlen (buf)] = '\n'; - /* Make sure we put the tabs back in the line. I do it this way so that I don't have to allocate memory again for each line as we read it */ gftp_restore_cache_line (¢ry, buf); + /* Make sure when we call gftp_get_line() that we pass the read size + as sizeof(buf) - 1 so that we'll have room to put the newline */ + buf[strlen (buf)] = '\n'; + if (gftp_fd_write (NULL, buf, strlen (buf), newfd) < 0) break; }