mirror of
https://github.com/gilbertchen/duplicacy
synced 2025-12-19 01:33:27 +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()
|
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()
|
fileHasher := manager.config.NewFileHasher()
|
||||||
alternateHash := false
|
alternateHash := false
|
||||||
if strings.HasPrefix(file.Hash, "#") {
|
if strings.HasPrefix(file.Hash, "#") {
|
||||||
|
|||||||
Reference in New Issue
Block a user