on error paths, although the one in PSFTP's wildcard_iterate will come
up in normal usage.
[originally from svn r9916]
*/
for (i = 0; i < nnames; i++)
printf("%s\n", ournames[i].longname);
*/
for (i = 0; i < nnames; i++)
printf("%s\n", ournames[i].longname);
if (!scp_sftp_filehandle) {
tell_user(stderr, "pscp: unable to open %s: %s",
fullname, fxp_error());
if (!scp_sftp_filehandle) {
tell_user(stderr, "pscp: unable to open %s: %s",
fullname, fxp_error());
!(attrs.permissions & 0040000)) {
tell_user(stderr, "unable to create directory %s: %s",
fullname, err);
!(attrs.permissions & 0040000)) {
tell_user(stderr, "unable to create directory %s: %s",
fullname, err);
if (!ret || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS)) {
tell_user(stderr, "unable to identify %s: %s", fname,
ret ? "file type not supplied" : fxp_error());
if (!ret || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS)) {
tell_user(stderr, "unable to identify %s: %s", fname,
ret ? "file type not supplied" : fxp_error());
+ if (must_free_fname) sfree(fname);
if (act.action == SCP_SINK_DIR) {
if (exists && attr != FILE_TYPE_DIRECTORY) {
run_err("%s: Not a directory", destfname);
if (act.action == SCP_SINK_DIR) {
if (exists && attr != FILE_TYPE_DIRECTORY) {
run_err("%s: Not a directory", destfname);
continue;
}
if (!exists) {
if (!create_directory(destfname)) {
run_err("%s: Cannot create directory", destfname);
continue;
}
if (!exists) {
if (!create_directory(destfname)) {
run_err("%s: Cannot create directory", destfname);
continue;
}
}
sink(destfname, NULL);
/* can we set the timestamp for directories ? */
continue;
}
}
sink(destfname, NULL);
/* can we set the timestamp for directories ? */
continue;
}
f = open_new_file(destfname, act.permissions);
if (f == NULL) {
run_err("%s: Cannot create file", destfname);
continue;
}
f = open_new_file(destfname, act.permissions);
if (f == NULL) {
run_err("%s: Cannot create file", destfname);
- if (scp_accept_filexfer())
+ if (scp_accept_filexfer()) {
+ sfree(destfname);
+ close_wfile(f);
stat_bytes = uint64_make(0, 0);
stat_starttime = time(NULL);
stat_bytes = uint64_make(0, 0);
stat_starttime = time(NULL);
set_file_times(f, act.mtime, act.atime);
}
set_file_times(f, act.mtime, act.atime);
}
close_wfile(f);
if (wrerror) {
run_err("%s: Write error", destfname);
close_wfile(f);
if (wrerror) {
run_err("%s: Write error", destfname);
continue;
}
(void) scp_finish_filerecv();
continue;
}
(void) scp_finish_filerecv();
printf("%s: canonify: %s\n", newname, fxp_error());
ret = 0;
}
printf("%s: canonify: %s\n", newname, fxp_error());
ret = 0;
}
matched = TRUE;
ret &= func(ctx, cname);
sfree(cname);
matched = TRUE;
ret &= func(ctx, cname);
sfree(cname);