Skip to content

Commit

Permalink
Fix nonTransferableKeys in BackupUtils (#979)
Browse files Browse the repository at this point in the history
* Fix nonTransferableKeys in BackupUtils

* Whoops...

* really...
  • Loading branch information
Luna712 committed Mar 10, 2024
1 parent 807bd85 commit a01bb9e
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ object BackupUtils {
PLUGINS_KEY_LOCAL,

OPEN_SUBTITLES_USER_KEY,
"nginx_user", // Nginx user key
"biometric_key" // can lock down users if backup is shared on a incompatible device

DOWNLOAD_EPISODE_CACHE,

"biometric_key", // can lock down users if backup is shared on a incompatible device
"nginx_user" // Nginx user key
)

/** false if blacklisted key */
/** false if key should not be contained in backup */
private fun String.isTransferable(): Boolean {
return !nonTransferableKeys.contains(this)
return !nonTransferableKeys.any { this.contains(it) }
}

private var restoreFileSelector: ActivityResultLauncher<Array<String>>? = null
Expand Down Expand Up @@ -257,4 +260,4 @@ object BackupUtils {
setKeyRaw(it.key, it.value, isEditingAppSettings)
}
}
}
}

0 comments on commit a01bb9e

Please sign in to comment.