]> git.decadent.org.uk Git - memories.git/commitdiff
Change order so tags get read from RAW file on import.
authorSimon Cozens <simon@simon-cozens.org>
Sat, 24 Mar 2007 15:49:00 +0000 (15:49 +0000)
committerSimon Cozens <simon@simon-cozens.org>
Sat, 24 Mar 2007 15:49:00 +0000 (15:49 +0000)
git-svn-id: http://svn.simon-cozens.org/memories/trunk@50 041978f6-d955-411f-a9d7-1d8545c9c3c7

Memories/Photo.pm

index 4945dd8fc719510f045da426022b9692882dc649..691a71415fe3dc210aad283cacc68ee733de6d0d 100644 (file)
@@ -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;
 }