mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 10:52:53 +00:00
feat: add a flag to know if a repo has been reseted
This commit is contained in:
@@ -122,6 +122,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
|
||||
clearTimeout(progressTimeout);
|
||||
}
|
||||
|
||||
this.repository.model.isReseted = false;
|
||||
await this.repository.updateStatus(RepositoryStatus.READY);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,11 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
|
||||
} else {
|
||||
content = Buffer.from("");
|
||||
}
|
||||
await storage.write(file.originalCachePath, content, file, this);
|
||||
this.repository.model.isReseted = false;
|
||||
await this.repository.model.save();
|
||||
if (this.repository.status !== RepositoryStatus.READY)
|
||||
await this.repository.updateStatus(RepositoryStatus.READY);
|
||||
await storage.write(file.originalCachePath, content, file, this);
|
||||
return stream.Readable.from(content);
|
||||
} catch (error) {
|
||||
if ((error as any).status === 404 || (error as any).httpStatus === 404) {
|
||||
|
||||
Reference in New Issue
Block a user