Fix warnings.

This commit is contained in:
Relintai 2022-12-31 16:02:27 +01:00
parent a54844becf
commit faf7b1573f

View File

@ -64,7 +64,8 @@ internal class AssetsDirectoryAccess(context: Context) : DirectoryAccessHandler.
override fun hasDirId(dirId: Int) = dirs.indexOfKey(dirId) >= 0
override fun dirOpen(path: String): Int {
val assetsPath = getAssetsPath(path) ?: return INVALID_DIR_ID
val assetsPath : String = getAssetsPath(path)
try {
val files = assetManager.list(assetsPath) ?: return INVALID_DIR_ID
// Empty directories don't get added to the 'assets' directory, so
@ -85,7 +86,8 @@ internal class AssetsDirectoryAccess(context: Context) : DirectoryAccessHandler.
}
override fun dirExists(path: String): Boolean {
val assetsPath = getAssetsPath(path)
val assetsPath : String = getAssetsPath(path)
try {
val files = assetManager.list(assetsPath) ?: return false
// Empty directories don't get added to the 'assets' directory, so
@ -99,7 +101,7 @@ internal class AssetsDirectoryAccess(context: Context) : DirectoryAccessHandler.
}
override fun fileExists(path: String): Boolean {
val assetsPath = getAssetsPath(path) ?: return false
val assetsPath : String = getAssetsPath(path)
try {
val files = assetManager.list(assetsPath) ?: return false
// Empty directories don't get added to the 'assets' directory, so