Revision 182

Date:
2012/01/31 13:34:12
Author:
ahitrov
Revision Log:
Правильная обработка нераспознанных файлов
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/lib/Contenido/File.pm

     
    212 212 undef $fh_tmp;
    213 213
    214 214 my $image_info = image_info($filename_tmp.'.'.$ext);
    215 if ( ref $image_info && $image_info->{file_ext} ne $ext ) {
    216 rename $filename_tmp.'.'.$ext, $filename_tmp.'.'.$image_info->{file_ext};
    217 $ext = $image_info->{file_ext};
    218 } elsif ( !ref $image_info ) {
    215 if ( !(ref $image_info && $image_info->{width} && $image_info->{height}) || (ref $image_info && $image_info->{error}) ) {
    219 216 unlink $filename_tmp.'.'.$ext;
    220 217 return undef;
    221 218 }
    219 if ( $image_info->{file_ext} ne $ext ) {
    220 rename $filename_tmp.'.'.$ext, $filename_tmp.'.'.$image_info->{file_ext};
    221 $ext = $image_info->{file_ext};
    222 }
    222 223 my $transformed;
    223 224 if ( exists $prop->{transform} && ref $prop->{transform} eq 'ARRAY' && scalar @{$prop->{transform}} == 2 && $prop->{transform}[0] =~ /(crop|resize|shrink)/ ) {
    224 225 my $c_line;