remote file management: fix typos found by Scrutinizer

This commit is contained in:
David Anderson 2017-01-29 12:37:17 -08:00
parent 0b6cb9e0d5
commit 863ae7331a
2 changed files with 5 additions and 7 deletions

View File

@ -217,8 +217,6 @@ function upload_files($r) {
$tmp_name = $f['tmp_name'];
$fname = $phys_names[$i];
$path = dir_hier_path($fname, project_dir() . "/download", $fanout);
$md5 = md5_file($tmp_name);
$size = filesize($tmp_name);
switch(check_download_file($tmp_name, $path)) {
case 0:

View File

@ -166,7 +166,7 @@ function stage_file($file) {
if (!$md5) {
xml_error(-1, "BOINC server: Can't get MD5 of inline data");
}
$name = job_file_name($md);
$name = job_file_name($md5);
$path = dir_hier_path($name, $download_dir, $fanout);
if (file_exists($path)) return $name;
if (!file_put_contents($path, $file->source)) {
@ -274,8 +274,8 @@ function make_wu_template($job) {
//echo "writing wt $f\n";
file_put_contents($f, $job->wu_template);
$wu_templates[$job->wu_template] = $f;
} else {
//echo "dup wu template\n";
//} else {
// echo "dup wu template\n";
}
}
@ -292,8 +292,8 @@ function make_result_template($job) {
file_put_contents($filename, $job->result_template);
}
$result_templates[$job->result_template] = $filename;
} else {
//echo "dup result template\n";
//} else {
// echo "dup result template\n";
}
}