Add extra parameter to recvrequest, specifying if local filenames
should be parsed as "-" and "|". git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3804 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -832,7 +832,8 @@ abortrecv(int sig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
recvrequest(char *cmd, char *local, char *remote, char *lmode, int printnames)
|
recvrequest(char *cmd, char *local, char *remote,
|
||||||
|
char *lmode, int printnames, int local_given)
|
||||||
{
|
{
|
||||||
FILE *fout, *din = 0;
|
FILE *fout, *din = 0;
|
||||||
int (*closefunc) (FILE *);
|
int (*closefunc) (FILE *);
|
||||||
@@ -873,7 +874,7 @@ recvrequest(char *cmd, char *local, char *remote, char *lmode, int printnames)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
oldintr = signal(SIGINT, abortrecv);
|
oldintr = signal(SIGINT, abortrecv);
|
||||||
if (strcmp(local, "-") && *local != '|') {
|
if (!local_given || (strcmp(local, "-") && *local != '|')) {
|
||||||
if (access(local, 2) < 0) {
|
if (access(local, 2) < 0) {
|
||||||
char *dir = strrchr(local, '/');
|
char *dir = strrchr(local, '/');
|
||||||
|
|
||||||
@@ -945,9 +946,9 @@ recvrequest(char *cmd, char *local, char *remote, char *lmode, int printnames)
|
|||||||
if (din == NULL)
|
if (din == NULL)
|
||||||
goto abort;
|
goto abort;
|
||||||
set_buffer_size(fileno(din), 1);
|
set_buffer_size(fileno(din), 1);
|
||||||
if (strcmp(local, "-") == 0)
|
if (local_given && strcmp(local, "-") == 0)
|
||||||
fout = stdout;
|
fout = stdout;
|
||||||
else if (*local == '|') {
|
else if (local_given && *local == '|') {
|
||||||
oldintp = signal(SIGPIPE, SIG_IGN);
|
oldintp = signal(SIGPIPE, SIG_IGN);
|
||||||
fout = popen(local + 1, "w");
|
fout = popen(local + 1, "w");
|
||||||
if (fout == NULL) {
|
if (fout == NULL) {
|
||||||
|
Reference in New Issue
Block a user