Skip to content

Commit

Permalink
Remove current edit image if resetting image.
Browse files Browse the repository at this point in the history
Otherwise old modifications will be applied again after the the first mod after
the reset.
  • Loading branch information
yunosh committed Apr 1, 2014
1 parent 869d2b9 commit 765e61c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions horde/services/images/view.php
Expand Up @@ -58,6 +58,9 @@
if (empty($action) || ($action == 'resize')) {
/* Use original if no action or if resizing. */
$file_name = $tmpdir . '/' . $file;
if (file_exists($tmpdir . '/mod_' . $file)) {
unlink($tmpdir . '/mod_' . $file);
}
} else {
$file_name = $tmpdir . '/mod_' . $file;
if (!file_exists($file_name)) {
Expand Down

0 comments on commit 765e61c

Please sign in to comment.