Fixed file-extension substitution

This commit is contained in:
Jaidyn Lev 2018-10-09 19:42:44 -05:00
parent d7ba97617d
commit 9bf0144003

View File

@ -7,7 +7,7 @@ $file_ext = file_extension($file_name);
if (!empty($_POST["desired_filename"])) {
$file_name = $_POST["desired_filename"];
if (!file_extension($file_name)) {
$file_name = $file_name . $file_ext;
$file_name = $file_name . "." . $file_ext;
}
}
$file_name = sanitize_filename($file_name);