mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-18 17:23:22 +00:00
Disable caching when retriving files in SnapshotManager
This commit is contained in:
@@ -1113,6 +1113,14 @@ func (manager *SnapshotManager) RetrieveFile(snapshot *Snapshot, file *Entry, ou
|
||||
|
||||
manager.CreateChunkDownloader()
|
||||
|
||||
// Temporarily disable the snapshot cache of the download so that downloaded file chunks won't be saved
|
||||
// to the cache.
|
||||
snapshotCache := manager.chunkDownloader.snapshotCache
|
||||
manager.chunkDownloader.snapshotCache = nil
|
||||
defer func() {
|
||||
manager.chunkDownloader.snapshotCache = snapshotCache
|
||||
}()
|
||||
|
||||
fileHasher := manager.config.NewFileHasher()
|
||||
alternateHash := false
|
||||
if strings.HasPrefix(file.Hash, "#") {
|
||||
|
||||
Reference in New Issue
Block a user