Skip to content

Commit

Permalink
Do not proceed to delete if upload is not ended
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Dec 4, 2023
1 parent b1a2403 commit 61fdd71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resumable.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ private function createFileAndDeleteTmp(string $identifier, ?string $filename):
$this->isUploadComplete = true;
}

if ($this->deleteTmpFolder === false) {
// Stop here
if ($this->deleteTmpFolder === false || $this->isUploadComplete === false) {
// Stop here upload is not complete or the temp files should not be deleted
return;
}

Expand Down

0 comments on commit 61fdd71

Please sign in to comment.