Commit 3e4d208b authored by rswindell's avatar rswindell
Browse files

Extra log level message (INFO, WARNING, and DEBUG) when moving netamil file...

Extra log level message (INFO, WARNING, and DEBUG) when moving netamil file attachments (attached files) - for debugging the issue reported by
alterego (ALTERANT)
parent d549d804
...@@ -2822,7 +2822,7 @@ int mv(const char *insrc, const char *indest, bool copy) ...@@ -2822,7 +2822,7 @@ int mv(const char *insrc, const char *indest, bool copy)
return(0); return(0);
// lprintf(LOG_DEBUG, "%s file from %s to %s", copy ? "Copying":"Moving", src, dest); // lprintf(LOG_DEBUG, "%s file from %s to %s", copy ? "Copying":"Moving", src, dest);
if(!fexistcase(src)) { if(!fexistcase(src)) {
lprintf(LOG_WARNING,"MV ERROR: Source doesn't exist '%s",src); lprintf(LOG_WARNING,"MV ERROR: Source doesn't exist '%s'",src);
return(-1); return(-1);
} }
if(isdir(dest)) { if(isdir(dest)) {
...@@ -4589,8 +4589,10 @@ int import_netmail(const char* path, fmsghdr_t hdr, FILE* fp, const char* inboun ...@@ -4589,8 +4589,10 @@ int import_netmail(const char* path, fmsghdr_t hdr, FILE* fp, const char* inboun
sp=strrchr(tp,'/'); /* sp is slash pointer */ sp=strrchr(tp,'/'); /* sp is slash pointer */
if(!sp) sp=strrchr(tp,'\\'); if(!sp) sp=strrchr(tp,'\\');
if(sp) tp=sp+1; if(sp) tp=sp+1;
lprintf(LOG_INFO, "Processing attached file: '%s'", tp);
SAFEPRINTF2(str,"%s%s", inbound, tp); SAFEPRINTF2(str,"%s%s", inbound, tp);
if(!fexistcase(str)) { if(!fexistcase(str)) {
lprintf(LOG_WARNING, "Attached file not found in expected inbound: '%s'", str);
if(inbound == cfg.inbound) if(inbound == cfg.inbound)
inbound = cfg.secure_inbound; inbound = cfg.secure_inbound;
else else
...@@ -4601,6 +4603,7 @@ int import_netmail(const char* path, fmsghdr_t hdr, FILE* fp, const char* inboun ...@@ -4601,6 +4603,7 @@ int import_netmail(const char* path, fmsghdr_t hdr, FILE* fp, const char* inboun
mkpath(tmp); mkpath(tmp);
backslash(tmp); backslash(tmp);
strcat(tmp,tp); strcat(tmp,tp);
lprintf(LOG_DEBUG, "Moving attachment from '%s' to '%s'", str, tmp);
mv(str,tmp,0); mv(str,tmp,0);
if(!p) if(!p)
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment