From: Simon Cozens Date: Sat, 24 Mar 2007 15:49:00 +0000 (+0000) Subject: Change order so tags get read from RAW file on import. X-Git-Tag: 1.2+svn20070808~18 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1ea2bc20e4db4c0fd7ac23ca6bae5247eeb1dc1a;p=memories.git Change order so tags get read from RAW file on import. git-svn-id: http://svn.simon-cozens.org/memories/trunk@50 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- diff --git a/Memories/Photo.pm b/Memories/Photo.pm index 4945dd8..691a714 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -124,13 +124,13 @@ sub upload_raw { my ($self, $r, $filename, $offered_name) = @_; my $jpg = tmpnam().".jpg"; system("dcraw -c $filename | convert - $jpg"); - my $photo = $self->upload_jpeg($r, $jpg, $offered_name); $filename =~ /\.(.*)$/; my $format = $1; - $photo->format($format); # Put the file in place + $photo->format($format); copy($filename, Memories->config->{data_store}."/".$photo->id.".".$format); + my $photo = $self->upload_jpeg($r, $jpg, $offered_name); return $photo; }