Skip to content

Commit

Permalink
[CP-3086] Fixed chunks joining for backup files (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurczewski authored Sep 6, 2024
1 parent 2eae09a commit 15a5980
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class FileManager {
try {
const file =
this.serviceBridge.fileTransfer.getFileByTransferId(transferId)
writeFileSync(filePath, file.chunks.join(), "base64")
writeFileSync(filePath, file.chunks.join(""), "base64")

return Result.success(undefined)
} catch (e) {
Expand Down Expand Up @@ -130,8 +130,8 @@ export class FileManager {
this.serviceBridge.fileTransfer.getFileByTransferId(transferId)

const featureData = password
? AES.encrypt(transfer.chunks.join(), password).toString()
: transfer.chunks.join()
? AES.encrypt(transfer.chunks.join(""), password).toString()
: transfer.chunks.join("")

return { ...acc, [feature]: featureData }
},
Expand Down

0 comments on commit 15a5980

Please sign in to comment.