diff --git a/src/mod/share.mod/share.c b/src/mod/share.mod/share.c index 40452536a..ec650e9e1 100644 --- a/src/mod/share.mod/share.c +++ b/src/mod/share.mod/share.c @@ -26,6 +26,7 @@ #include "src/mod/module.h" +#include #include #include #include @@ -1244,9 +1245,11 @@ static void share_ufsend(int idx, char *par) zapfbot(idx); } else if (copy_to_tmp && !(f = tmpfile())) { putlog(LOG_MISC, "*", "CAN'T WRITE TEMPORARY USERFILE DOWNLOAD FILE!"); + debug1("share: tmpfile(): %s", strerror(errno)); zapfbot(idx); } else if (!copy_to_tmp && !(f = fopen(s, "wb"))) { putlog(LOG_MISC, "*", "CAN'T WRITE USERFILE DOWNLOAD FILE!"); + debug2("share: fopen(%s): %s", s, strerror(errno)); zapfbot(idx); } else { /* Ignore longip and use botaddr, arg kept for backward compat for pre 1.8.3 */