From 596a46c17c2aac05885be76f7a182a4568be3d9d Mon Sep 17 00:00:00 2001 From: Thomas Parkison Date: Fri, 6 Sep 2024 21:09:22 -0400 Subject: [PATCH] Fixed downloading of attachments. --- Export-Bitwarden.psd1 | 2 +- Export-Bitwarden.psm1 | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Export-Bitwarden.psd1 b/Export-Bitwarden.psd1 index df96f42..f505112 100644 --- a/Export-Bitwarden.psd1 +++ b/Export-Bitwarden.psd1 @@ -12,7 +12,7 @@ RootModule = 'Export-Bitwarden.psm1' # Version number of this module. -ModuleVersion = '1.45' +ModuleVersion = '1.46' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/Export-Bitwarden.psm1 b/Export-Bitwarden.psm1 index eb90118..f0f442d 100644 --- a/Export-Bitwarden.psm1 +++ b/Export-Bitwarden.psm1 @@ -32,7 +32,7 @@ function Export-Bitwarden { # Don't touch this line! # == WARNING!!! DO NOT TOUCH ANYTHING BELOW THIS!!! == # ==================================================== - $ver = "1.45" + $ver = "1.46" Write-Host -ForegroundColor Green "========================================================================================" Write-Host -ForegroundColor Green "== Bitwarden Vault Export Script v$ver ==" @@ -364,6 +364,9 @@ function Export-Bitwarden { # Don't touch this line! foreach ($attachment in $item.attachments) { $filePath = Join-Path $saveFolderAttachments $item.name + if ($IsWindows) { $filePath = $filePath + "\" } + else { $filePath = $filePath + "/" } + & $bwCliBinName get attachment "$($attachment.fileName)" --itemid $item.id --output $filePath if ($IsWindows) { Write-Host "" } }