1
0
Fork 0

New finding by Static Code Analysis: revert uniqid() to comply long path requirements

pull/7470/head
Vladimir Reznichenko 2018-07-16 22:40:48 +02:00
parent cd39efc72c
commit 6f6d59426d
1 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ class ArchiveManager
$sourcePath = realpath('.'); $sourcePath = realpath('.');
} else { } else {
// Directory used to download the sources // Directory used to download the sources
$sourcePath = sys_get_temp_dir().'/composer_archive'.uniqid('', true); $sourcePath = sys_get_temp_dir().'/composer_archive'.uniqid();
$filesystem->ensureDirectoryExists($sourcePath); $filesystem->ensureDirectoryExists($sourcePath);
// Download sources // Download sources
@ -161,7 +161,7 @@ class ArchiveManager
} }
// Create the archive // Create the archive
$tempTarget = sys_get_temp_dir().'/composer_archive'.uniqid('', true).'.'.$format; $tempTarget = sys_get_temp_dir().'/composer_archive'.uniqid().'.'.$format;
$filesystem->ensureDirectoryExists(dirname($tempTarget)); $filesystem->ensureDirectoryExists(dirname($tempTarget));
$archivePath = $usableArchiver->archive($sourcePath, $tempTarget, $format, $package->getArchiveExcludes(), $ignoreFilters); $archivePath = $usableArchiver->archive($sourcePath, $tempTarget, $format, $package->getArchiveExcludes(), $ignoreFilters);