mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Minor modification: in remote->local non-recursive mode matching a
wildcard, we don't abandon ship completely if the wildcard matches a directory; we just warn and carry on with the rest. [originally from svn r1210]
This commit is contained in:
parent
0da98d052d
commit
e6c8913093
18
scp.c
18
scp.c
@ -1234,16 +1234,28 @@ int scp_get_sink_action(struct scp_sink_action *act)
|
|||||||
struct fxp_names *names;
|
struct fxp_names *names;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It's a directory. If we're not in recursive mode and
|
* It's a directory. If we're not in recursive mode,
|
||||||
* we haven't been passed a wildcard from
|
* this merits a complaint (which is fatal if the name
|
||||||
* scp_sink_setup, this just merits a complaint.
|
* was specified directly, but not if it was matched by
|
||||||
|
* a wildcard).
|
||||||
|
*
|
||||||
|
* We skip this complaint completely if
|
||||||
|
* scp_sftp_wildcard is set, because that's an
|
||||||
|
* indication that we're not actually supposed to
|
||||||
|
* _recursively_ transfer the dir, just scan it for
|
||||||
|
* things matching the wildcard.
|
||||||
*/
|
*/
|
||||||
if (!scp_sftp_recursive && !scp_sftp_wildcard) {
|
if (!scp_sftp_recursive && !scp_sftp_wildcard) {
|
||||||
tell_user(stderr, "pscp: %s: is a directory", fname);
|
tell_user(stderr, "pscp: %s: is a directory", fname);
|
||||||
errs++;
|
errs++;
|
||||||
if (must_free_fname) sfree(fname);
|
if (must_free_fname) sfree(fname);
|
||||||
|
if (scp_sftp_dirstack_head) {
|
||||||
|
act->action = SCP_SINK_RETRY;
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Otherwise, the fun begins. We must fxp_opendir() the
|
* Otherwise, the fun begins. We must fxp_opendir() the
|
||||||
|
Loading…
Reference in New Issue
Block a user