fix: check if cache exists before removing it

This commit is contained in:
tdurieux
2023-02-16 08:15:21 +01:00
parent 2a5f22a483
commit 2b10b10207

View File

@@ -295,7 +295,9 @@ export default class Repository {
* @returns
*/
async removeCache() {
return storage.rm(this._model.repoId + "/");
if (await storage.exists(this._model.repoId + "/")) {
return storage.rm(this._model.repoId + "/");
}
}
/**