Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jul 30, 2024
1 parent 1ccf684 commit e78e6e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions objects/functionsExec.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,13 @@ function unzipDirectory($filename, $destination)
ini_set('memory_limit', '-1');
set_time_limit(0);

// Ensure the destination directory exists
// Ensure the destination directory exists, create it if it doesn't
if (!is_dir($destination)) {
_error_log("unzipDirectory: Destination directory does not exist: {$destination}");
return false;
if (!mkdir($destination, 0755, true)) {
_error_log("unzipDirectory: Failed to create destination directory: {$destination}");
return false;
}
_error_log("unzipDirectory: Destination directory created: {$destination}");
}

// Ensure the destination directory is writable
Expand Down

0 comments on commit e78e6e9

Please sign in to comment.