From 108b14261c10ded483d8e260f435486faeab4349 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:39:45 +0800 Subject: [PATCH] fix a new bug in tmp_dir --- common.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.php b/common.php index 3693263..88b1928 100644 --- a/common.php +++ b/common.php @@ -616,12 +616,12 @@ function filecache($disktag) { $dir = sys_get_temp_dir(); if (!is_writable($dir)) { - $tmp = $_SERVER['HTTP_HOST'] . '/tmp/'; + $tmp = __DIR__ . '/tmp/'; if (file_exists($tmp)) { if ( is_writable($tmp) ) $dir = $tmp; } elseif ( mkdir($tmp) ) $dir = $tmp; } - $tag = __DIR__ . '/OneManager/' . $disktag; + $tag = $_SERVER['HTTP_HOST'] . '/OneManager/' . $disktag; while (strpos($tag, '/')>-1) $tag = str_replace('/', '_', $tag); if (strpos($tag, ':')>-1) { $tag = str_replace(':', '_', $tag);