Fix file picker

We swapped the 'recursive' flag, shamecube.
This commit is contained in:
Adrian Ulrich 2018-08-20 21:21:36 +02:00
parent 5f9d91e9e7
commit e07fcc768b
2 changed files with 1 additions and 2 deletions

View File

@ -528,7 +528,7 @@ public class MediaUtils {
path = sanitizeMediaPath(path);
String query = MediaLibrary.SongColumns.PATH+" = ?";
if (!recursive) {
if (recursive) {
// This is a LIKE query: add a slash to the directory if the current path
// points to an existing one.
path = addDirEndSlash(path) + "%";

View File

@ -750,7 +750,6 @@ public final class SongTimeline {
if (count == 0 && type == MediaUtils.TYPE_FILE && query.selectionArgs.length == 1) {
String pathQuery = query.selectionArgs[0];
pathQuery = pathQuery.substring(0,pathQuery.length()-1); // remove '%' -> this used to be an sql query!
cursor.close(); // close old version
cursor = MediaUtils.getCursorForFileQuery(pathQuery);
count = cursor.getCount();