mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-04 01:55:04 +00:00
android: prevent imported archive from being written outside the export folder (#7375)
This commit is contained in:
+2
-1
@@ -233,7 +233,8 @@ actual fun getFileName(uri: URI): String? {
|
||||
val nameIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)
|
||||
cursor.moveToFirst()
|
||||
// Can make an exception
|
||||
cursor.getString(nameIndex)
|
||||
// the provider controls this value, and callers use it as a bare file name
|
||||
cursor.getString(nameIndex)?.let { File(it).name }
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
|
||||
Reference in New Issue
Block a user