vwxyzjn / portwarden

Create Encrypted Backups of Your Bitwarden Vault with Attachments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Runtime error when having bitwarden item with trailing spaces.

vwxyzjn opened this issue · comments

bugreport
Suppose the Bitwarden item name is House Purchase of 2001 Hamilton St Apt 1705 (Notice there is a trailing space)

	cmd := exec.Command("bw", "get", "attachment", attachmentID, "--itemid", itemID,
		"--session", sessionKey, "--output", outputDir)

will actually create a folder with that trailing space, but windows somehow don't recognize it once it's there, causing the following line to fail

err = archiver.Zip.Write(writer, []string{BackupFolderName})
// panic: portwarden_backup: stat: CreateFile portwarden_backup: The system cannot find the file specified.

Solved by #11