Skip to content

Commit

Permalink
fix: repo synchronizer service download the file of package without Z…
Browse files Browse the repository at this point in the history
…ipSha256 even the package file is already exist
  • Loading branch information
Misaka-L committed Aug 29, 2024
1 parent 13de361 commit 48afc82
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,7 @@ private async ValueTask<string> ProcessPackageFileAsync(VpmPackage package, stri

if (await repoMetaDataService.GetVpmPackage(package.Name, package.Version, sourceRepoId) is not { } packageEntity)
{
if (sha256 is null || await fileHostService.LookupFileByHashAsync(sha256) is not { } fileId)
return await DownloadAndUploadFileAsync(package.Url, fileName, taskLogger, sha256);

taskLogger.LogInformation(
"File with same ZipSha256 is already Downloaded & Uploaded, Skip Download {PackageName}@{PackageVersion}",
package.Name,
package.Version);

return fileId;
return await DownloadAndUploadFileAsync(package.Url, fileName, taskLogger, sha256);
}

if (!await fileHostService.IsFileExist(packageEntity.FileId))
Expand Down

0 comments on commit 48afc82

Please sign in to comment.