mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
added tmpDir.deleteRecursively()
This commit is contained in:
parent
98c85d7eb2
commit
bdb6d78f97
2 changed files with 3 additions and 1 deletions
|
@ -76,7 +76,7 @@ class GithubApi(index: Int) : InAppAuthAPIManager(index){
|
||||||
UsernamePasswordCredentialsProvider(githubToken, "")
|
UsernamePasswordCredentialsProvider(githubToken, "")
|
||||||
)
|
)
|
||||||
.call();
|
.call();
|
||||||
tmpDir.delete()
|
tmpDir.deleteRecursively()
|
||||||
}
|
}
|
||||||
private class reposElements (
|
private class reposElements (
|
||||||
@JsonProperty("full_name") var repoName: String,
|
@JsonProperty("full_name") var repoName: String,
|
||||||
|
|
|
@ -330,6 +330,7 @@ object BackupUtils {
|
||||||
UsernamePasswordCredentialsProvider(token, "")
|
UsernamePasswordCredentialsProvider(token, "")
|
||||||
)
|
)
|
||||||
.call();
|
.call();
|
||||||
|
tmpDir.deleteRecursively()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -351,6 +352,7 @@ object BackupUtils {
|
||||||
.call()
|
.call()
|
||||||
val jsondata = tmpDir.listFiles()?.first { it.name != ".git" }?.readText().toString()
|
val jsondata = tmpDir.listFiles()?.first { it.name != ".git" }?.readText().toString()
|
||||||
val data = parseJson<BackupFile>(jsondata?: "")
|
val data = parseJson<BackupFile>(jsondata?: "")
|
||||||
|
tmpDir.deleteRecursively()
|
||||||
this@restorePromptGithub.restore(
|
this@restorePromptGithub.restore(
|
||||||
data,
|
data,
|
||||||
restoreSettings = true,
|
restoreSettings = true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue