From 701f6129cadcfb63c98a2738dfda1eb00de80e58 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Fri, 17 Oct 2008 06:45:32 +0000 Subject: Fixed bug: 4893 --- system/libraries/Image_lib.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index d7404afcb..67b73096b 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -453,19 +453,21 @@ class CI_Image_lib { // we'll simply make a copy of the original with the new name... assuming dynamic rendering is off. if ($this->dynamic_output === FALSE) { - if (($this->orig_width == $this->width AND $this->orig_height == $this->height) AND ($this->source_image != $this->new_image)) + if ($this->orig_width == $this->width AND $this->orig_height == $this->height) { - if ( ! @copy($this->full_src_path, $this->full_dst_path)) - { - $this->set_error('imglib_copy_failed'); - return FALSE; + if ($this->source_image != $this->new_image) + { + if (@copy($this->full_src_path, $this->full_dst_path)) + { + @chmod($this->full_dst_path, DIR_WRITE_MODE); + } } - - @chmod($this->full_dst_path, DIR_WRITE_MODE); + return TRUE; } } + // Let's set up our values based on the action if ($action == 'crop') { // Reassign the source width/height if cropping -- cgit v1.2.3-24-g4f1b