Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_output.php: send empty file if no files to send, rather then error messages #6001

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions html/user/get_output.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,14 @@ function get_batch_output_files($auth_str) {
// output file may be optional; don't complain if not there
}
}
// if no output files, make empty zip file
//
if (!file_exists($zip_filename)) {
touch($zip_filename);
}
do_download($zip_filename);
unlink($zip_filename);
unlink($zip_basename);
}

// return a single output file of a WU's canonical instance
Expand Down Expand Up @@ -190,6 +196,11 @@ function get_wu_output_files($wu_id, $auth_str) {
// output file may be optional; don't complain if not there
//
}
// if no output files, make empty zip file
//
if (!file_exists($zip_filename)) {
touch($zip_filename);
}
do_download($zip_filename);
unlink($zip_filename);
unlink($zip_basename);
Expand Down
Loading