Skip to content

Group tags issue #53

Description

@mstoecklein

Hello,

I am using the latest version 2.1.1. At first I thought I did something wrong, but after doing a separate test it seems like a bug in the save function. Group tags are not written into the output file.

import {default as kdbxweb} from 'kdbxweb';
import { writeFileSync } from 'fs';

const credentials = new kdbxweb.Credentials(kdbxweb.ProtectedValue.fromString('test'));

const db = kdbxweb.Kdbx.create(credentials, 'title');

const group = db.createGroup(db.getDefaultGroup(), 'Tagged Group');
// will not be saved in groups
group.tags = ['tag1', 'tag2'];

const entry = db.createEntry(group, 'Tagged Entry');
// will be saved in entries
entry.tags = ['tag1', 'tag2'];

const data = await db.saveXml();
writeFileSync('test.xml', data);

Here is the XML output of the KDBX file I get:

https://gist.github.com/mstoecklein/e2686de4c22a263240e75db6745df6ac

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions