mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-02 19:54:54 -06:00
Fixed a bug that caused all copied chunks to be RSA encrypted
The field encryptionVersion in the Chunk struct is supposed to pass the status of RSA encrytpion from a source chunk to a destination chunk in a copy command. This field needs to be a 3-state boolean in order to pass the status correctly.
This commit is contained in:
@@ -1732,7 +1732,11 @@ func (manager *BackupManager) CopySnapshots(otherManager *BackupManager, snapsho
|
||||
newChunk := otherManager.config.GetChunk()
|
||||
newChunk.Reset(true)
|
||||
newChunk.Write(chunk.GetBytes())
|
||||
newChunk.encryptionVersion = chunk.encryptionVersion
|
||||
if chunk.encryptionVersion == ENCRYPTION_VERSION_RSA {
|
||||
newChunk.encryptionVersion = CHUNK_RSA_ENCRYPTION_ENABLED
|
||||
} else {
|
||||
newChunk.encryptionVersion = CHUNK_RSA_ENCRYPTION_DISABLED
|
||||
}
|
||||
chunkUploader.StartChunk(newChunk, chunkIndex)
|
||||
totalCopied++
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user