int xfer_pid;
int a, b;
FILE *fp, *lsfp;
- int r;
int rv;
if ((room_flags & QR_UPLOAD) == 0) {
xfer_pid = fork();
if (xfer_pid == 0) {
rv = chdir(tempdir);
+ if (rv < 0) {
+ scr_printf("failed to change into %s Reason %s\nAborting now.\n",
+ tempdir,
+ strerror(errno));
+ nukedir(tempdir);
+ return;
+ }
switch (c) {
case 0:
stty_ctdl(0);
flnm);
newprompt(buf, desc, 150);
snprintf(buf, sizeof buf, "%s/%s", tempdir, flnm);
- r = CtdlIPCFileUpload(ipc, flnm, desc, buf, progress, tbuf);
+ CtdlIPCFileUpload(ipc, flnm, desc, buf, progress, tbuf);
scr_printf("%s\n", tbuf);
}
pclose(lsfp);