diff options
author | Marco Nelissen <marcone@google.com> | 2014-02-18 16:06:38 -0800 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2014-02-18 16:06:38 -0800 |
commit | d5a579765e06d69c1a33663c202c3593a5bd5c6b (patch) | |
tree | 35e1c3e8d427d63f4120b01e67c3b7db35c923bc /media | |
parent | 5441745effb885589c03050b59885e8a3ad96ad6 (diff) | |
download | frameworks_base-d5a579765e06d69c1a33663c202c3593a5bd5c6b.zip frameworks_base-d5a579765e06d69c1a33663c202c3593a5bd5c6b.tar.gz frameworks_base-d5a579765e06d69c1a33663c202c3593a5bd5c6b.tar.bz2 |
Fix regression
Don't crash if an item is inserted without a slash in its path.
b/13076381
Change-Id: I5cde2adaa038201e0692af3c8ca92540ce75f083
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/MediaScanner.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java index 01485b8..72f3e1a 100644 --- a/media/java/android/media/MediaScanner.java +++ b/media/java/android/media/MediaScanner.java @@ -1426,7 +1426,7 @@ public class MediaScanner } int firstSlash = path.lastIndexOf('/'); - if (firstSlash == 0) { + if (firstSlash <= 0) { return false; } String parent = path.substring(0, firstSlash); |