Skip to content
Snippets Groups Projects
Commit 42663238 authored by rswindell's avatar rswindell
Browse files

Added option to keep temp files (for debugging).

parent 61cbd709
Branches
Tags
No related merge requests found
......@@ -1779,7 +1779,9 @@ static void ctrl_thread(void* arg)
globfree(&g);
fclose(fp);
filexfer(&data_addr,sock,pasv_sock,&data_sock,fname,0L
,&transfer_inprogress,&transfer_aborted,TRUE,TRUE
,&transfer_inprogress,&transfer_aborted
,startup->options&FTP_OPT_KEEP_TEMP_FILES ? FALSE : TRUE
,TRUE
,&lastactive,&user,-1,FALSE,FALSE,FALSE,NULL);
continue;
} /* Local LIST/NLST */
......@@ -2249,7 +2251,9 @@ static void ctrl_thread(void* arg)
fclose(fp);
filexfer(&data_addr,sock,pasv_sock,&data_sock,fname,0L
,&transfer_inprogress,&transfer_aborted,TRUE,TRUE
,&transfer_inprogress,&transfer_aborted
,startup->options&FTP_OPT_KEEP_TEMP_FILES ? FALSE : TRUE
,TRUE
,&lastactive,&user,dir,FALSE,FALSE,FALSE,NULL);
continue;
}
......@@ -2384,6 +2388,9 @@ static void ctrl_thread(void* arg)
success=TRUE;
credits=FALSE;
tmpfile=TRUE;
if(startup->options&FTP_OPT_KEEP_TEMP_FILES)
delfile=FALSE;
else
delfile=TRUE;
fprintf(fp,"%-*s File/Folder Descriptions\r\n"
,INDEX_FNAME_LEN,startup->index_file_name);
......
......@@ -92,6 +92,7 @@ typedef struct {
#define FTP_OPT_ALLOW_QWK (1<<4)
#define FTP_OPT_NO_LOCAL_FSYS (1<<5)
#define FTP_OPT_DIR_FILES (1<<6) /* Allow access to files in dir but not in database */
#define FTP_OPT_KEEP_TEMP_FILES (1<<7) /* Don't delete temp files (for debugging) */
#define FTP_OPT_NO_HOST_LOOKUP (1<<11)
#define FTP_OPT_LOCAL_TIMEZONE (1<<30) /* Don't force UCT/GMT */
#define FTP_OPT_MUTE (1<<31)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment