]> code.citadel.org Git - citadel.git/commitdiff
prompt for filename in download_to_local_disk() when supplied is blank
authorArt Cancro <ajc@citadel.org>
Sat, 27 Feb 1999 12:48:34 +0000 (12:48 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 27 Feb 1999 12:48:34 +0000 (12:48 +0000)
citadel/ChangeLog
citadel/rooms.c

index 8072a43cb1d58ec7737cd11ba88124033d451ebf..f161f95663439fe8e623a4f2bec7d6b3121b0698 100644 (file)
@@ -1,3 +1,7 @@
+Sat Feb 27 07:47:36 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+       * rooms.c: download_to_local_disk() prompts for a filename if a blank
+         filename was supplied to it (for attachments without names)
+
 1999-02-24 Nathan Bryant <bryant@cs.usm.maine.edu>
        * configure.in: improved check for pthreads
        * configure.in, routines.c, acconfig.h: check for ut_type in struct utmp
index cee1650132929beaa548d5939075f4811944bb42..18bdae67bb02a3b26221b76bf244bbea32adcb72 100644 (file)
@@ -535,7 +535,7 @@ void ungoto(void) {
  * the [XYZ]modem code below...
  * (This function assumes that a download file is already open on the server)
  */
-void download_to_local_disk(char *filename, long total_bytes)
+void download_to_local_disk(char *supplied_filename, long total_bytes)
 {
        char buf[256];
        char dbuf[4096];
@@ -544,6 +544,12 @@ void download_to_local_disk(char *filename, long total_bytes)
        FILE *savefp;
        int broken = 0;
        int packet;
+       char filename[256];
+
+       strcpy(filename, supplied_filename);
+       if (strlen(filename)==0) {
+               newprompt("Filename: ", filename, 250);
+               }
 
        printf("Enter the name of the directory to save '%s'\n",
                filename);