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

Fix subfolders not being created (#4653)

In Bitwarden, subfolders are separated/indicated using forward-slashes
The Keeper CSV export separates folders uses backslashes
Replace backslashes with forwardslashes in processFolder
Added tests to verfiy folder/collection creation
This commit is contained in:
Daniel James Smith
2023-02-17 21:01:21 +01:00
committed by GitHub
parent 999a40e755
commit 2b9bc08c71
2 changed files with 48 additions and 0 deletions

View File

@@ -418,6 +418,8 @@ export abstract class BaseImporter {
protected processFolder(result: ImportResult, folderName: string) {
let folderIndex = result.folders.length;
const hasFolder = !this.isNullOrWhitespace(folderName);
// Replace backslashes with forward slashes, ensuring we create sub-folders
folderName = folderName.replace("\\", "/");
let addFolder = hasFolder;
if (hasFolder) {