Runtime error when having bitwarden item with trailing spaces.
vwxyzjn opened this issue · comments
Costa Huang commented
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.
Costa Huang commented
Solved by #11