]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Loader/KDB.pm
Change custom icons to an array
[chaz/p5-File-KDBX] / lib / File / KDBX / Loader / KDB.pm
index 1f0cb3d881457a0df3b999b37cd41de77e437de5..1b18f7b27fc81a036fd4797c7c23c7c40fe9e01e 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use Encode qw(encode);
 use File::KDBX::Constants qw(:header :cipher :random_stream :icon);
 use File::KDBX::Error;
-use File::KDBX::Util qw(:empty :io :uuid load_optional);
+use File::KDBX::Util qw(:class :empty :io :uuid load_optional);
 use File::KDBX;
 use Ref::Util qw(is_arrayref is_hashref);
 use Scalar::Util qw(looks_like_number);
@@ -15,7 +15,7 @@ use Time::Piece;
 use boolean;
 use namespace::clean;
 
-use parent 'File::KDBX::Loader';
+extends 'File::KDBX::Loader';
 
 our $VERSION = '999.999'; # VERSION
 
@@ -232,7 +232,7 @@ sub _convert_keepass_to_kdbx_headers {
     $meta->{settings_changed}                       = _decode_datetime($from->{settings_changed});
 
     while (my ($key, $value) = each %{$from->{custom_icons} || {}}) {
-        $meta->{custom_icons}{$key} = {value => $value};
+        push @{$meta->{custom_icons} //= []}, {uuid => $key, data => $value};
     }
     while (my ($key, $value) = each %{$from->{custom_data} || {}}) {
         $meta->{custom_data}{$key} = {value => $value};
This page took 0.026093 seconds and 4 git commands to generate.