Index: branches/5.3.x/core/units/helpers/upload_helper.php =================================================================== diff -u -N -r16391 -r16395 --- branches/5.3.x/core/units/helpers/upload_helper.php (.../upload_helper.php) (revision 16391) +++ branches/5.3.x/core/units/helpers/upload_helper.php (.../upload_helper.php) (revision 16395) @@ -1,6 +1,6 @@ deleteTempFiles($tmp_path); - if ( file_exists($tmp_path . 'resized/') ) { - $this->deleteTempFiles($tmp_path . 'resized/'); + $thumbs_path = preg_replace('/^' . preg_quote(FULL_PATH, '/') . '/', '', $tmp_path, 1); + $thumbs_path = FULL_PATH . THUMBS_PATH . $thumbs_path; + + if ( file_exists($thumbs_path) ) { + $this->deleteTempFiles($thumbs_path); } return preg_replace('/^' . preg_quote($id, '/') . '_/', '', $filename); @@ -262,8 +265,8 @@ $files = glob($path . '*.*'); $max_file_date = strtotime('-1 day'); - foreach ($files as $file) { - if (filemtime($file) < $max_file_date) { + foreach ( $files as $file ) { + if ( filemtime($file) < $max_file_date ) { unlink($file); } }