diff options
author | Mike Lockwood <lockwood@android.com> | 2011-05-04 08:57:56 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-05-04 08:57:56 -0700 |
commit | 0faefb72fb8917c9408f7b71c2bac5a9d5f264c2 (patch) | |
tree | 6b0a0dc0def4deb37cf811bd49cd203fee11e0a8 /media | |
parent | df8894486c246a8c4e47cc2b3547e9c173225f34 (diff) | |
parent | 8b1c74f96f93195326907db1bb07a3787a1c1b45 (diff) | |
download | frameworks_base-0faefb72fb8917c9408f7b71c2bac5a9d5f264c2.zip frameworks_base-0faefb72fb8917c9408f7b71c2bac5a9d5f264c2.tar.gz frameworks_base-0faefb72fb8917c9408f7b71c2bac5a9d5f264c2.tar.bz2 |
am 8b1c74f9: DO NOT MERGE MediaScanner: Fix bug in "no media" handling logic
* commit '8b1c74f96f93195326907db1bb07a3787a1c1b45':
DO NOT MERGE MediaScanner: Fix bug in "no media" handling logic
Diffstat (limited to 'media')
-rw-r--r-- | media/libmedia/MediaScanner.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp index 4e22175..28c8642 100644 --- a/media/libmedia/MediaScanner.cpp +++ b/media/libmedia/MediaScanner.cpp @@ -135,20 +135,21 @@ status_t MediaScanner::doProcessDirectory( } if (type == DT_REG || type == DT_DIR) { if (type == DT_DIR) { + bool childNoMedia = noMedia; // set noMedia flag on directories with a name that starts with '.' // for example, the Mac ".Trashes" directory if (name[0] == '.') - noMedia = true; + childNoMedia = true; // report the directory to the client if (stat(path, &statbuf) == 0) { - client.scanFile(path, statbuf.st_mtime, 0, true, noMedia); + client.scanFile(path, statbuf.st_mtime, 0, true, childNoMedia); } // and now process its contents strcat(fileSpot, "/"); int err = doProcessDirectory(path, pathRemaining - nameLength - 1, client, - noMedia, exceptionCheck, exceptionEnv); + childNoMedia, exceptionCheck, exceptionEnv); if (err) { // pass exceptions up - ignore other errors if (exceptionCheck && exceptionCheck(exceptionEnv)) goto failure; |