]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
When we get an error writing to a local file, stop the download rather than
authorBen Harris <bjh21@bjh21.me.uk>
Tue, 10 Apr 2007 21:46:44 +0000 (21:46 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 10 Apr 2007 21:46:44 +0000 (21:46 +0000)
pretending we just got -1 bytes.  Not actually tested, but it looks pretty
obvious.
Bug reported by dking wang.

[originally from svn r7459]

psftp.c

diff --git a/psftp.c b/psftp.c
index f8a2240e7727b23da5fc3f1eaa17622b562552eb..e41112aaadf1a83f03d464e0d8138bcaa61571fa 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -463,6 +463,7 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart)
                    printf("error while writing local file\n");
                    ret = 0;
                    xfer_set_error(xfer);
+                   break;
                }
                wpos += wlen;
            }