From 1e1caf43d194ca4067bea25fc607235fb6e2ca8d Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 16 Dec 2005 19:52:20 +0000 Subject: [PATCH] Fixed file importing of non-archived files --- ChangeLog | 3 +++ mbfido/mbfimport.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dff78303..9ea62c27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ $Id$ v0.83.4 04-Dec-2005 + mbfile: + Fixed file importing of non-archived files. + mbtask: Experimental code to recover from a half dead chatlink. Added some protection against looped configuration. diff --git a/mbfido/mbfimport.c b/mbfido/mbfimport.c index 4e68b20e..8fcf12ba 100644 --- a/mbfido/mbfimport.c +++ b/mbfido/mbfimport.c @@ -125,7 +125,7 @@ void ImportFiles(int Area) Syslog('+', "Unknown archive format %s", temp); snprintf(temp2, PATH_MAX, "%s/tmp/arc%d/%s", getenv("MBSE_ROOT"), (int)getpid(), f_db.Name); if ((rc = file_cp(temp, temp2))) { - WriteError("Can't copy file to %s, %s", temp2, strerror(rc)); + WriteError("1 Can't copy file to %s, %s", temp2, strerror(rc)); if (!do_quiet) printf("Can't copy file to %s, %s\n", temp2, strerror(rc)); Doit = FALSE; @@ -159,7 +159,6 @@ void ImportFiles(int Area) Doit = FALSE; } } - clean_tmpwork(); if (Doit) { if (!do_quiet) { printf("Adding \b\b\b\b\b\b\b\b\b\b"); @@ -193,6 +192,12 @@ void ImportFiles(int Area) if (enoughspace(CFG.freespace) == 0) die(MBERR_DISK_FULL); + /* + * Refresh tmpwork + */ + clean_tmpwork(); + create_tmpwork(); + Files++; memset(&f_db, 0, sizeof(f_db)); Present = TRUE; @@ -414,7 +419,6 @@ void ImportFiles(int Area) Doit = FALSE; } } - clean_tmpwork(); if (Doit) { if (!do_quiet) { printf("Adding \b\b\b\b\b\b\b\b\b\b"); @@ -436,6 +440,7 @@ void ImportFiles(int Area) } } + clean_tmpwork(); free(fod); free(lname); free(dest);