Skip to content
Snippets Groups Projects
Commit eaf5cb1d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't refuse to over-write a 0-byte file in the inbound dir.

parent d50aeb1a
No related branches found
No related tags found
No related merge requests found
...@@ -514,7 +514,7 @@ function callout_want_callback(fobj, fsize, fdate, offset, bp) ...@@ -514,7 +514,7 @@ function callout_want_callback(fobj, fsize, fdate, offset, bp)
if (this.received_files.indexOf(fobj.name) != -1) if (this.received_files.indexOf(fobj.name) != -1)
return this.file.REJECT; return this.file.REJECT;
// Reject or skip existing files. // Reject or skip existing files.
if (file_exists(fobj.name)) { if (file_size(fobj.name) > 0) {
log(LOG_WARNING, "Inbound file already exists: " + fobj.name); log(LOG_WARNING, "Inbound file already exists: " + fobj.name);
// If the size and date are the same, reject it. // If the size and date are the same, reject it.
if (fsize == file_size(fobj.name) && fdate == file_date(fobj.name)) if (fsize == file_size(fobj.name) && fdate == file_date(fobj.name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment