Fix ensureDbDirectoryExists
This commit is contained in:
parent
af119db1d7
commit
fcfdcd1025
2 changed files with 21 additions and 2 deletions
|
|
@ -45,10 +45,9 @@ class ContentSettingsManager(private val fileLocator: NewPipeFileLocator) {
|
|||
* @return Whether the directory exists afterwards.
|
||||
*/
|
||||
fun ensureDbDirectoryExists(): Boolean {
|
||||
return !fileLocator.dbDir.exists() && !fileLocator.dbDir.mkdir()
|
||||
return fileLocator.dbDir.exists() || fileLocator.dbDir.mkdir()
|
||||
}
|
||||
|
||||
|
||||
fun extractDb(filePath: String): Boolean {
|
||||
val success = ZipHelper.extractFileFromZip(filePath, fileLocator.db.path, "newpipe.db")
|
||||
if (success) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue