]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiMailSync.pm
lei_mail_sync: set_src uses binary OIDs
[public-inbox.git] / lib / PublicInbox / LeiMailSync.pm
index 275e0cc4c433ce6b27fa43ee86984b5147885d6f..f8834a27720145e0d4f3a09bd47919a0d5cc96a2 100644 (file)
@@ -118,7 +118,7 @@ EOM
 }
 
 sub set_src {
-       my ($self, $oidhex, $folder, $id) = @_;
+       my ($self, $oidbin, $folder, $id) = @_;
        my $fid = $self->{fmap}->{$folder} //= fid_for($self, $folder, 1);
        my $sth;
        if (ref($id)) { # scalar name
@@ -131,7 +131,7 @@ INSERT OR IGNORE INTO blob2name (oidbin, fid, name) VALUES (?, ?, ?)
 INSERT OR IGNORE INTO blob2num (oidbin, fid, uid) VALUES (?, ?, ?)
 
        }
-       $sth->execute(pack('H*', $oidhex), $fid, $id);
+       $sth->execute($oidbin, $fid, $id);
 }
 
 sub clear_src {