1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 06:38:37 -05:00

When the comments say `if we're in restart mode', the code in

question should actually be conditional on restart mode!

[originally from svn r7438]
This commit is contained in:
Simon Tatham 2007-04-02 08:44:00 +00:00
parent 5f410ef051
commit 0a3c07d15e

View File

@ -321,6 +321,7 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart)
* If none of them exists, of course, we start at 0. * If none of them exists, of course, we start at 0.
*/ */
i = 0; i = 0;
if (restart) {
while (i < nnames) { while (i < nnames) {
char *nextoutfname; char *nextoutfname;
int ret; int ret;
@ -337,6 +338,7 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart)
} }
if (i > 0) if (i > 0)
i--; i--;
}
/* /*
* Now we're ready to recurse. Starting at ournames[i] * Now we're ready to recurse. Starting at ournames[i]
@ -568,6 +570,7 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
* If none of them exists, of course, we start at 0. * If none of them exists, of course, we start at 0.
*/ */
i = 0; i = 0;
if (restart) {
while (i < nnames) { while (i < nnames) {
char *nextoutfname; char *nextoutfname;
nextoutfname = dupcat(outfname, "/", ournames[i], NULL); nextoutfname = dupcat(outfname, "/", ournames[i], NULL);
@ -582,6 +585,7 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
} }
if (i > 0) if (i > 0)
i--; i--;
}
/* /*
* Now we're ready to recurse. Starting at ournames[i] * Now we're ready to recurse. Starting at ournames[i]