nested folders use `/`

This commit is contained in:
Kyle Spearrin 2018-07-23 17:37:32 -04:00
parent 20ac5a98a3
commit 6dc13e8579
5 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ export class KeePass2XmlImporter extends BaseImporter implements Importer {
if (!isRootNode) {
if (groupName !== '') {
groupName += ' > ';
groupName += '/';
}
const nameEl = this.querySelectorDirectChild(node, 'Name');
groupName += nameEl == null ? '-' : nameEl.textContent;

View File

@ -19,7 +19,7 @@ export class KeePassXCsvImporter extends BaseImporter implements Importer {
value.Group = !this.isNullOrWhitespace(value.Group) && value.Group.startsWith('Root/') ?
value.Group.replace('Root/', '') : value.Group;
const groupName = !this.isNullOrWhitespace(value.Group) ? value.Group.split('/').join(' > ') : null;
const groupName = !this.isNullOrWhitespace(value.Group) ? value.Group : null;
this.processFolder(result, groupName);
const cipher = this.initLoginCipher();

View File

@ -24,7 +24,7 @@ export class PasswordSafeXmlImporter extends BaseImporter implements Importer {
Array.from(entries).forEach((entry) => {
const group = this.querySelectorDirectChild(entry, 'group');
const groupText = group != null && !this.isNullOrWhitespace(group.textContent) ?
group.textContent.split('.').join(' > ') : null;
group.textContent.split('.').join('/') : null;
this.processFolder(result, groupText);
const title = this.querySelectorDirectChild(entry, 'title');

View File

@ -16,7 +16,7 @@ export class RoboFormCsvImporter extends BaseImporter implements Importer {
results.forEach((value) => {
const folder = !this.isNullOrWhitespace(value.Folder) && value.Folder.startsWith('/') ?
value.Folder.replace('/', '') : value.Folder;
const folderName = !this.isNullOrWhitespace(folder) ? folder.split('/').join(' > ') : null;
const folderName = !this.isNullOrWhitespace(folder) ? folder : null;
this.processFolder(result, folderName);
const cipher = this.initLoginCipher();

View File

@ -71,7 +71,7 @@ export class StickyPasswordXmlImporter extends BaseImporter implements Importer
return groupText;
}
if (!this.isNullOrWhitespace(groupText)) {
groupText = ' > ' + groupText;
groupText = '/' + groupText;
}
groupText = group.getAttribute('Name') + groupText;
return this.buildGroupText(doc, group.getAttribute('ParentID'), groupText);