Skip to content

Commit

Permalink
Fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
MLDMoritz authored Jul 27, 2023
1 parent 37a3291 commit bd7cd4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VueFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function archive()
$items = json_decode($this->request->get('items'), false, 512, JSON_THROW_ON_ERROR);
$name .= '.zip';
$path = $this->request->get('path').DIRECTORY_SEPARATOR.$name;
$zipFile = sys_get_temp_dir().$name;
$zipFile = tempnam(sys_get_temp_dir(), $name);

if ($this->manager->fileExists($path)) {
throw new Exception('The archive is exists. Try another name.');
Expand Down Expand Up @@ -431,7 +431,7 @@ public function unarchive()

$zipStream = $this->manager->readStream($zipItem);

$zipFile = sys_get_temp_dir().basename($zipItem);
$zipFile = tempnam(sys_get_temp_dir(), $zipItem);

file_put_contents($zipFile, $zipStream);

Expand Down

0 comments on commit bd7cd4b

Please sign in to comment.