From ff207ba5bfe89a4ccdfa229bd225f5cf4850e35a Mon Sep 17 00:00:00 2001 From: Gilbert Chen Date: Fri, 8 Sep 2023 13:30:28 -0400 Subject: [PATCH] Convert the file path to the real one when downloading a chunk This is mainly to handle the case when a fossil needs to be downloaded. This happens when a metadata chunk has been marked as a fossil while the correpsonding snapshot must be reconstructed for determine referenced chunks. --- src/duplicacy_gcdstorage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duplicacy_gcdstorage.go b/src/duplicacy_gcdstorage.go index af86a6e..d7fea7b 100644 --- a/src/duplicacy_gcdstorage.go +++ b/src/duplicacy_gcdstorage.go @@ -775,7 +775,7 @@ func (storage *GCDStorage) GetFileInfo(threadIndex int, filePath string) (exist // DownloadFile reads the file at 'filePath' into the chunk. func (storage *GCDStorage) DownloadFile(threadIndex int, filePath string, chunk *Chunk) (err error) { // We never download the fossil so there is no need to convert the path - fileID, err := storage.getIDFromPath(threadIndex, filePath, false) + fileID, err := storage.getIDFromPath(threadIndex, storage.convertFilePath(filePath), false) if err != nil { return err }