Skip to content

Commit

Permalink
LIMS-1074: Use readgzfile to replace readfile, and gzdecode the conte…
Browse files Browse the repository at this point in the history
…nts of files to manipulate
  • Loading branch information
Mark Williams committed Oct 27, 2023
1 parent 1aa68bd commit 83448fb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion api/src/Downstream/BigEPPhasing.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function results() {
$dat['IMAGE'] = file_exists($image) || file_exists($image.'.gz');

$model = $this->_get_attachments('big_ep_model_ispyb.json');

$dat['HASMODEL'] = $model && (file_exists($model['FILE']) || file_exists($model['FILE'].'.gz'));
if ($model) {
if (file_exists($model['FILE'])) {
Expand Down
2 changes: 1 addition & 1 deletion api/src/Downstream/Type/FastEp.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function results() {
if (file_exists($lst['FILE'])) {
$lst = file_get_contents($lst['FILE']);
} elseif (file_exists($lst['FILE'].'.gz')) {
$lst = readgzfile($lst['FILE'].'.gz');
$lst = gzdecode(file_get_contents($lst['FILE'].'.gz'));
} else {
$this->_error('Could not find sad.lst file');
}
Expand Down

0 comments on commit 83448fb

Please sign in to comment.