fix(tinyfilemanager): basename not support cjk chars by default
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Baoshuo Ren 2023-02-06 17:07:56 +08:00
parent f948d0f4c3
commit f6c8600830
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A

View File

@ -809,7 +809,7 @@ if (!empty($_FILES) && !FM_READONLY) {
$targetPath = $path . $ds; $targetPath = $path . $ds;
if ( is_writable($targetPath) ) { if ( is_writable($targetPath) ) {
$fullPath = $path . '/' . basename($fullPathInput); $fullPath = $path . '/' . array_pop(explode("/", $fullPathInput));
$folder = substr($fullPath, 0, strrpos($fullPath, "/")); $folder = substr($fullPath, 0, strrpos($fullPath, "/"));
if(file_exists ($fullPath) && !$override_file_name && !$chunks) { if(file_exists ($fullPath) && !$override_file_name && !$chunks) {