MediaScanner: Do not update the file path when updating records already in the database
The path should never change (media scanner treats renames as a delete and an insert) and we want to preserve the mixed case paths in the database to avoid exposing the lowercase squashing to MTP. Change-Id: I79ef37e143c607242d438a4a0643d40191965b6a Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@@ -784,6 +784,9 @@ public class MediaScanner
|
|||||||
} else {
|
} else {
|
||||||
// updated file
|
// updated file
|
||||||
result = ContentUris.withAppendedId(tableUri, rowId);
|
result = ContentUris.withAppendedId(tableUri, rowId);
|
||||||
|
// path should never change, and we want to avoid replacing mixed cased paths
|
||||||
|
// with squashed lower case paths
|
||||||
|
values.remove(MediaStore.MediaColumns.DATA);
|
||||||
mMediaProvider.update(result, values, null, null);
|
mMediaProvider.update(result, values, null, null);
|
||||||
}
|
}
|
||||||
if (mProcessGenres && mGenre != null) {
|
if (mProcessGenres && mGenre != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user