summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/ExportGedcomClient.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2020-03-28 22:21:28 +0000
committerGreg Roach <greg@subaqua.co.uk>2020-03-28 22:21:28 +0000
commita00baf472844c2db5ceef8a740f7eaac375894e7 (patch)
treea9128599de48bf8e82e97883e6f5917fb119426f /app/Http/RequestHandlers/ExportGedcomClient.php
parent21bbc77713ed863881cf331fd2cd1edbe3ddfd82 (diff)
downloadwebtrees-a00baf472844c2db5ceef8a740f7eaac375894e7.tar.gz
webtrees-a00baf472844c2db5ceef8a740f7eaac375894e7.tar.bz2
webtrees-a00baf472844c2db5ceef8a740f7eaac375894e7.zip
Fix: temporary files for .ZIP archives
Diffstat (limited to 'app/Http/RequestHandlers/ExportGedcomClient.php')
-rw-r--r--app/Http/RequestHandlers/ExportGedcomClient.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Http/RequestHandlers/ExportGedcomClient.php b/app/Http/RequestHandlers/ExportGedcomClient.php
index 42fac96034..54f61fd6b6 100644
--- a/app/Http/RequestHandlers/ExportGedcomClient.php
+++ b/app/Http/RequestHandlers/ExportGedcomClient.php
@@ -105,7 +105,7 @@ class ExportGedcomClient implements RequestHandlerInterface
$path = $tree->getPreference('MEDIA_DIRECTORY', 'media/');
// Create a new/empty .ZIP file
- $temp_zip_file = tempnam(sys_get_temp_dir(), 'webtrees-zip-');
+ $temp_zip_file = stream_get_meta_data(tmpfile())['uri'];
$zip_adapter = new ZipArchiveAdapter($temp_zip_file);
$zip_filesystem = new Filesystem($zip_adapter);
$zip_filesystem->writeStream($download_filename, $tmp_stream);