added tmpDir.deleteRecursively()

This commit is contained in:
Antony 2022-08-24 22:49:08 +02:00
parent 98c85d7eb2
commit bdb6d78f97
2 changed files with 3 additions and 1 deletions

View file

@ -76,7 +76,7 @@ class GithubApi(index: Int) : InAppAuthAPIManager(index){
UsernamePasswordCredentialsProvider(githubToken, "")
)
.call();
tmpDir.delete()
tmpDir.deleteRecursively()
}
private class reposElements (
@JsonProperty("full_name") var repoName: String,

View file

@ -330,6 +330,7 @@ object BackupUtils {
UsernamePasswordCredentialsProvider(token, "")
)
.call();
tmpDir.deleteRecursively()
}
@ -351,6 +352,7 @@ object BackupUtils {
.call()
val jsondata = tmpDir.listFiles()?.first { it.name != ".git" }?.readText().toString()
val data = parseJson<BackupFile>(jsondata?: "")
tmpDir.deleteRecursively()
this@restorePromptGithub.restore(
data,
restoreSettings = true,