mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Fix temporary directory creation in secureUnzipDirectory function to ensure it only attempts to create if it doesn't already exist
This commit is contained in:
parent
b926fcbdfc
commit
c527e04aa1
1 changed files with 2 additions and 2 deletions
|
@ -184,8 +184,8 @@ function secureUnzipDirectory($zipFile, $destination) {
|
|||
|
||||
try {
|
||||
// Create temporary directory for extraction
|
||||
$tempDir = getTmpDir('/avideo_' . uniqid());
|
||||
if (!mkdir($tempDir, 0755, true)) {
|
||||
$tempDir = getTmpDir('avideo_' . uniqid());
|
||||
if (!is_dir($tempDir) && !mkdir($tempDir, 0755, true)) {
|
||||
throw new Exception("Could not create temporary directory {$tempDir}");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue