diff --git a/ChangeLog b/ChangeLog index e5424bed..5970c7a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4270,6 +4270,7 @@ v0.33.19 26-Oct-2001 When a file area is made unavailable in menu 8.4, first the files in that area area checked. If there are none, the area is completly removed, including paths, indexes and database. + When an new area is made available, the database is created. The AREADEF lines in golded.inc now contain the aka to use instead of a dot. diff --git a/TODO b/TODO index 9fa0877f..38342866 100644 --- a/TODO +++ b/TODO @@ -15,13 +15,6 @@ $Id$ mbsebbs: - L: Reading of function keys over modem lines, or worse PPP connections, - must be fixed. Timing problems together with modem buffering? - It works with direct serial connections. Note, this also happens - on busy LAN's between Linux boxes with normal xterm's. - Note: this problem almost dissapeared after kernel upgrade to - 2.2.16. Another note, this does not happen over ssh. - L: Must include SEEN-BY and other hidden lines into BlueWave and QWK mail, must be user selectable. see remarks of William McBrine. The default is oke now. @@ -44,12 +37,10 @@ mbfido: U: Code cleanup and make a structure in this program. Remove duplicate or similar functions. - N: Received files not in an archive are not scanned for virusses. - N: Remove memory leak during toss. (It's ok for less 5000 messages for each run). - N: Implement long filename support from .tic files. + N: Implement long filename support from .tic files (testing fase). N: When a news article is received from a mailinglist there is a valid To: address in the message, the gate doesn't see that and uses the @@ -66,8 +57,6 @@ mbfido: N: Also check for file_id.diz filenames. mbcico: - U: Implement nodes FNC flag for sending files. - L: Implement modem connect response translation for ISDN lines, i.e. make the CAUSE responses human readable. see McMail for this option. diff --git a/mbsetup/m_farea.c b/mbsetup/m_farea.c index dc5bba2d..59e8e290 100644 --- a/mbsetup/m_farea.c +++ b/mbsetup/m_farea.c @@ -173,6 +173,7 @@ int AppendFilearea(void) area.FileFind = TRUE; area.AddAlpha = TRUE; area.FileReq = TRUE; + strcpy(area.Path, CFG.ftp_base); fwrite(&area, sizeof(area), 1, fil); fclose(fil); FileUpdated = 1; @@ -314,12 +315,12 @@ int EditFileRec(int Area) case 5: E_SEC( 10,16, area.LTSec, "8.4.5 LIST SECURITY", FileScreen) case 6: E_STR( 11,16,64, area.FilesBbs, "The path and name of \"files.bbs\" if area is on CDROM") case 7: Available = edit_bool(12, 16, area.Available, (char *)"Is this area ^available^"); + temp = calloc(PATH_MAX, sizeof(char)); + sprintf(temp, "%s/fdb/fdb%d.data", getenv("MBSE_ROOT"), Area); if (area.Available && !Available) { /* * Attempt to disable this area, but check first. */ - temp = calloc(PATH_MAX, sizeof(char)); - sprintf(temp, "%s/fdb/fdb%d.data", getenv("MBSE_ROOT"), Area); if ((fp = fopen(temp, "r"))) { fseek(fp, 0, SEEK_END); files = ftell(fp) / sizeof(file); @@ -329,13 +330,23 @@ int EditFileRec(int Area) } fclose(fp); } + if (!Available) { + if (yes_no((char *)"Are you sure you want to delete this area") == 0) + Available = TRUE; + } if (!Available) { /* * Make it so */ unlink(temp); - sprintf(temp, "rm -r -f %s", area.Path); - system(temp); + if (strlen(area.Path) && strcmp(area.Path, CFG.ftp_base)) { + /* + * Erase file in path if path is set and not the default + * FTP base path + */ + sprintf(temp, "rm -r -f %s", area.Path); + system(temp); + } memset(&area, 0, sizeof(area)); /* * Fill in default values @@ -345,15 +356,22 @@ int EditFileRec(int Area) area.FileFind = TRUE; area.AddAlpha = TRUE; area.FileReq = TRUE; + strcpy(area.Path, CFG.ftp_base); Syslog('+', "Removed file area %d", Area); } - free(temp); area.Available = Available; FileScreen(); } if (!area.Available && Available) { area.Available = TRUE; + if ((fp = fopen(temp, "a+")) == NULL) { + WriteError("$Can't create file database %s", temp); + } else { + fclose(fp); + } + chmod(temp, 0660); } + free(temp); break; case 8: E_BOOL(13,16, area.New, "Include this area in ^new files^ check") case 9: E_BOOL(14,16, area.Dupes, "Check this area for ^duplicates^ during upload")