diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-27 08:55:03 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-08-27 08:55:03 +1000 |
| commit | 5003a692b4505eccdb57447fbf77e4333c8014c0 (patch) | |
| tree | 094f71f77c1f71655e83baf329bfbe8d80732018 | |
| parent | 319cd2520ff18120570e56eba04ceb1206007375 (diff) | |
exiftool: Use -overwrite_original. Important bugfix; old images were never being deleted when using exiftool (instead kept as *_original in /tmp)
| -rw-r--r-- | post.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -526,7 +526,8 @@ if (isset($_POST['delete'])) { escapeshellarg($upload)); if ($config['use_exiftool'] && !$config['strip_exif']) { if ($exiftool_error = shell_exec_error( - 'exiftool -q -orientation=1 -n ' . escapeshellarg($upload))) + 'exiftool -overwrite_original -q -q -orientation=1 -n ' . + escapeshellarg($upload))) error('exiftool failed!', null, $exiftool_error); } else { // TODO: Find another way to remove the Orientation tag from the EXIF profile @@ -589,7 +590,8 @@ if (isset($_POST['delete'])) { if ($config['redraw_image'] || (!@$post['exif_stripped'] && $config['strip_exif'] && ($post['extension'] == 'jpg' || $post['extension'] == 'jpeg'))) { if (!$config['redraw_image'] && $config['use_exiftool']) { - if($error = shell_exec_error('exiftool -ignoreMinorErrors -q -q -all= ' . escapeshellarg($upload))) + if($error = shell_exec_error('exiftool -overwrite_original -ignoreMinorErrors -q -q -all= ' . + escapeshellarg($upload))) error('Could not strip EXIF metadata!', null, $error); } else { $image->to($post['file']); |
