1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 03:33:54 +00:00

Added capability on psono importer to add sub-folders (#7602)

This commit is contained in:
aj-rosado
2024-01-24 12:55:43 +00:00
committed by GitHub
parent 7436f9112d
commit 512f6ef892
5 changed files with 146 additions and 6 deletions

View File

@@ -350,7 +350,11 @@ export abstract class BaseImporter {
}
}
protected processFolder(result: ImportResult, folderName: string) {
protected processFolder(
result: ImportResult,
folderName: string,
addRelationship: boolean = true,
) {
if (this.isNullOrWhitespace(folderName)) {
return;
}
@@ -374,7 +378,10 @@ export abstract class BaseImporter {
result.folders.push(f);
}
result.folderRelationships.push([result.ciphers.length, folderIndex]);
//Some folders can have sub-folders but no ciphers directly, we should not add to the folderRelationships array
if (addRelationship) {
result.folderRelationships.push([result.ciphers.length, folderIndex]);
}
}
protected convertToNoteIfNeeded(cipher: CipherView) {