1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

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.
This commit is contained in:
Gilbert Chen
2023-09-08 13:30:28 -04:00
parent 3a81c1065a
commit ff207ba5bf

View File

@@ -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
}