From c5e3608cc816a53a6f0b0d726e7dcec0aef1b451 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 12 Jan 2024 20:55:16 +0100 Subject: [PATCH] Try twice to create tmp folder --- Blacklight/processing/post/ProcessAdditional.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index b0cec6eb4..afe1ca944 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -613,10 +613,11 @@ class ProcessAdditional $this->tmpPath = $this->_mainTmpPath.$this->_release->guid.'/'; if (! File::isDirectory($this->tmpPath)) { if (! File::makeDirectory($this->tmpPath, 0777, true, false) && ! File::isDirectory($this->tmpPath)) { - $this->_echo('Unable to create directory: '.$this->tmpPath, 'warning'); - $this->_deleteRelease(); - - return false; + // We will try to create the main temp folder again, just in case there was a file lock or filesystem issue. + if (! File::makeDirectory($this->tmpPath, 0777, true, false) && ! File::isDirectory($this->tmpPath)) { + $this->_echo('Unable to create directory: '.$this->tmpPath, 'warning'); + return false; + } } }