1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-11 02:24:00 +02:00

Fix zipnload temporary file

Signed-off-by: Marco Dickert <marco@misterunknown.de>
This commit is contained in:
Marco Dickert
2020-08-04 11:58:11 +02:00
parent 68c36cd63b
commit 4c0c80be8f

View File

@@ -812,7 +812,11 @@ IFM_ASSETS
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['invalid_filename'] ) ); $this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['invalid_filename'] ) );
else { else {
unset( $zip ); unset( $zip );
$dfile = $this->pathCombine( __DIR__, $this->config['tmp_dir'], uniqid( "ifm-tmp-" ) . ".zip" ); // temporary filename if ($this->isAbsolutePath($this->config['tmp_dir']))
$dfile = $this->pathCombine( $this->config['tmp_dir'], uniqid( "ifm-tmp-" ) . ".zip" ); // temporary filename
else
$dfile = $this->pathCombine( __DIR__, $this->config['tmp_dir'], uniqid( "ifm-tmp-" ) . ".zip" ); // temporary filename
try { try {
IFMArchive::createZip(realpath($d['filename']), $dfile, array($this, 'isFilenameValid')); IFMArchive::createZip(realpath($d['filename']), $dfile, array($this, 'isFilenameValid'));
if( $d['filename'] == "." ) { if( $d['filename'] == "." ) {