fix: improve reqs on non-existing files

This commit is contained in:
tdurieux
2023-05-01 22:45:18 +02:00
parent a23f089a8a
commit 7d8b087a5d
4 changed files with 25 additions and 17 deletions
+4 -4
View File
@@ -135,10 +135,10 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
if (await storage.exists(file.originalCachePath)) {
return storage.read(file.originalCachePath);
}
await this.download();
// update the file list
await this.repository.files({ force: true });
return storage.read(file.originalCachePath);
throw new AnonymousError("file_not_found", {
httpStatus: 404,
object: file,
});
}
async getFiles() {