feat: add a flag to know if a repo has been reseted

This commit is contained in:
tdurieux
2023-04-03 10:21:56 +02:00
parent ef1a2bfa4a
commit 344ecf2a33
6 changed files with 19 additions and 6 deletions

View File

@@ -318,6 +318,8 @@ export default class Repository {
* @returns
*/
async removeCache() {
this.model.isReseted = true;
await this.model.save();
if (await storage.exists(this._model.repoId + "/")) {
return storage.rm(this._model.repoId + "/");
}