1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

Fix files not being saved in certain cases (#483)

This commit is contained in:
370chan 2022-08-20 19:24:46 +03:00 committed by GitHub
parent b5eee58b96
commit c170bc7ef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -966,6 +966,8 @@ if (isset($_POST['delete'])) {
$thumb->_destroy();
}
$dont_copy_file = false;
if ($config['redraw_image'] || (!@$file['exif_stripped'] && $config['strip_exif'] && ($file['extension'] == 'jpg' || $file['extension'] == 'jpeg'))) {
if (!$config['redraw_image'] && $config['use_exiftool']) {
@ -988,6 +990,7 @@ if (isset($_POST['delete'])) {
$config['file_icons'][$file['extension']] : $config['file_icons']['default']));
$file['thumbwidth'] = $size[0];
$file['thumbheight'] = $size[1];
$dont_copy_file = false;
}
if ($config['tesseract_ocr'] && $file['thumb'] != 'file') { // Let's OCR it!
@ -1018,7 +1021,7 @@ if (isset($_POST['delete'])) {
}
}
if (!isset($dont_copy_file) || !$dont_copy_file) {
if (!$dont_copy_file) {
if (isset($file['file_tmp'])) {
if (!@rename($file['tmp_name'], $file['file']))
error($config['error']['nomove']);