I think your problem may be in Dir. Since you are using an old app that might be using file.direxternal or something like that where it becomes an issue with newer OS in terms of permission. It also looks like you are using a listview. For newer projects it is recommended to use xCustomListview and B4XPages type of projects:
You code if you use code tags, will look better:
Private Sub ListaFiles(Dir As String)
Dim lstFiler As List
lstFiler.Initialize
Dim strTemp As String
lstFiler = File.ListFiles(Dir)
For i = 0 To lstFiler.Size - 1 'you can also use for each...
strTemp = lstFiler.Get(i)
If strTemp.IndexOf(".") = - 1 Or strTemp.IndexOf(".csv") > 0 Then
lsvFile.AddSingleLine(strTemp)
Log(strTemp)
End If
Next
End Sub