diff --git a/ChangeLog b/ChangeLog index 0da8b182..69dd0313 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,9 @@ v0.71.1 28-Nov-2004 8.3 and long filenames and does the right thing during import. During file import the destination is tested for both 8.3 and LFN for an existing file. Improved error reporting. + With mbfile import the original file isn't renamed anymore. + Fixed error reporting when files in files.bbs were not found + on disk. mbfido: In rfc2ftn a debug logmessage added to check for unrecognised diff --git a/mbfido/mbfimport.c b/mbfido/mbfimport.c index 473bb60e..c9f07311 100644 --- a/mbfido/mbfimport.c +++ b/mbfido/mbfimport.c @@ -45,7 +45,7 @@ extern int do_novir; /* Suppress virus scanning */ void ImportFiles(int Area) { - char *pwd, *temp, *temp2, *tmpdir, *String, *token, *dest, *unarc, *lname; + char *pwd, *temp, *fod, *temp2, *tmpdir, *String, *token, *dest, *unarc, *lname; FILE *fbbs; DIR *dp; int Append = FALSE, Files = 0, rc, i, line = 0, pos, x, y, Doit; @@ -81,6 +81,7 @@ void ImportFiles(int Area) String = calloc(4096, sizeof(char)); dest = calloc(PATH_MAX, sizeof(char)); lname = calloc(PATH_MAX, sizeof(char)); + fod = calloc(PATH_MAX, sizeof(char)); getcwd(pwd, PATH_MAX); if (CheckFDB(Area, area.Path)) @@ -215,15 +216,16 @@ void ImportFiles(int Area) closedir(dp); if (strlen(temp2) == 0) { - WriteError("Can't find file on disk, skipping: %s", temp2); + WriteError("Can't find file on disk, skipping: %s", token); if (!do_quiet) - printf("\nCan't find file on disk, skipping: %s\n", temp2); + printf("\nCan't find file on disk, skipping: %s\n", token); Append = FALSE; Present = FALSE; } else { /* * Check type of filename and set the right values. */ + strcpy(fod, temp2); if (is_real_8_3(temp2)) { Syslog('f', "%s is 8.3", temp2); strcpy(f_db.Name, temp2); @@ -234,12 +236,9 @@ void ImportFiles(int Area) strcpy(f_db.LName, temp2); name_mangle(temp2); strcpy(f_db.Name, temp2); - if (strcmp(f_db.LName, f_db.Name) && (rename(f_db.LName, f_db.Name) == 0)) { - Syslog('+', "Renamed %s to %s", f_db.LName, f_db.Name); - } } - sprintf(temp, "%s/%s", pwd, f_db.Name); + sprintf(temp, "%s/%s", pwd, fod); stat(temp, &statfile); if (do_annon) @@ -433,6 +432,7 @@ void ImportFiles(int Area) } } + free(fod); free(lname); free(dest); free(String);