Skip to content

Commit

Permalink
Merge pull request #2 from lizmat/master
Browse files Browse the repository at this point in the history
Make sure there is a bare Exifdata object always
  • Loading branch information
frithnanth authored Sep 30, 2024
2 parents 6c02fd7 + c93d4eb commit 808beee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Image/Libexif.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ submethod BUILD(Str :$file?, Buf :$data?)
{
with $file {
if $file.IO.f {
$!exif = exif_data_new_from_file $file;
$!exif = exif_data_new_from_file($file) // exif_data_new;
} else {
fail X::Libexif.new: errno => 1, error => "File $file not found";
}
Expand All @@ -154,7 +154,7 @@ submethod BUILD(Str :$file?, Buf :$data?)
method open(Str $file!)
{
fail X::Libexif.new: errno => 1, error => "File $file not found" if ! $file.IO.e;
$!exif = exif_data_new_from_file $file;
$!exif = exif_data_new_from_file($file) // exif_data_new;
self;
}

Expand Down

0 comments on commit 808beee

Please sign in to comment.