Skip to content

Commit 2e20260

Browse files
Merge pull request #63 from kiwilan/develop
v2.3.02
2 parents 739cec1 + 83c4542 commit 2e20260

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kiwilan/php-archive",
3-
"version": "2.3.01",
3+
"version": "2.3.02",
44
"description": "PHP package to handle archives (.zip, .rar, .tar, .7z, .pdf) with unified API and hybrid solution (native/p7zip), designed to works with EPUB and CBA (.cbz, .cbr, .cb7, .cbt).",
55
"keywords": [
66
"php",

src/ArchiveTemporaryDirectory.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ protected function __construct(
1414

1515
public static function make(?string $filename = null): self
1616
{
17-
return new self(uniqid(), $filename);
17+
$prefix = substr(bin2hex(random_bytes(2)), 0, 4);
18+
$uniq = uniqid(more_entropy: true);
19+
$uniq = str_replace('.', '', $uniq);
20+
$uuid = "archive_{$prefix}_{$uniq}";
21+
22+
return new self($uuid, $filename);
1823
}
1924

2025
public function clear(): bool

0 commit comments

Comments
 (0)