Tested in unagi with Gecko-e2abfaf.Gaia-00c0349. STR: 1-Browse files in your sd card and change the name of one of your files to ."current_name" 2-Open music app 3-Verify every music file in your sd card is listed in the app Expected result --> Every music file in your sd card is listed in the app Actual result --> Files which name begins with a . are not listed
Unagi Build ID: 20130306070201 Kernel Date: Dec 5 Gecko: http://hg.mozilla.org/releases/mozilla-b Gaia: 77fb74ebf3bea340be9f8f4b4c9ac9dd7c12ab0b This issue reproduces even when a folder name starts with dot symbol ".", then files that wrapped in the folder are not listed in the "Music Player" This issue reproduces not only with file,
the files starting with a . are usually files which are hidden like .bashrc or .DS_Store etc. So am wondering if the current behavior of not showing such files for playback is indeed the correct behavior. We should get somebody from Product side to weigh in on this. Hema, would you be able to help find the right contact for making this call.
Given the frequency in which this likely happens, I would mark this a P2 or P3. It's not urgent to fix, but we should address these types of 'papercut' bugs. To a user, it'll feel like data loss on the OS and could drive customer care calls, but I imagine the frequency to be relatively low.
Files beginning with . are intentionally ignored by the MediaDB library. I think this is a feature, not a bug. If you connect your phone to a desktop computer and delete files, some desktop OSes will create a .Trash directory on your SD card and will move files into it. If we don't ignore the .Trash directory, the deleted files will still appear in the Music app (or gallery or video). And we'll have the more serious bug where deleting things does not work. The gallery app also relies on this feature of MediaDB so that it can create a hidden .gallery/ directory to store preview images in. If we remove the feature, then we'll start seeing two copies of those images in gallery. We could modify MediaDB so that directories that begin with . are ignored but files that begin with . are not ignored. We could do that, and that is the only reason that I'm not closing the bug right away. But the bug report seem silly to me. We also don't display music files if you add ".music" at the end of the file name. I don't see how adding "." at the beginning of a filename is a common enough thing to do to bother about.
Created attachment 762233 [details] [review] PR to show files beginning with dot PR to show files beginning with dot and ignore directories that begin with dot https://github.com/mozilla-b2g/gaia/pull/10350
Attachment #762233 - Flags: review?(dflanagan)
Thanks David for clarifying. I have attached PR to show only files with dot and ignore directories with dot. Since the changes are in mediadb this PR will show dot files in music, video and gallery app.
Comment on attachment 762233 [details] [review] PR to show files beginning with dot We have a one github-commit per bugzilla bug policy, so you'll have to squash the two commits before landing. It looks like the second one completely replaces the first anyway. I'm glad that you wrote a test for your code. But I don't think you should include the test as part of the patch, because it isn't actually testing the code in mediadb.js, only a copy of that code. If the test is completely self-contained like that, it will pass, (and then pass forever) without actually testing any changes made to mediadb.js. So it will give us false confidence in mediadb.js that isn't justified. Also see my comments on github about the actual code of the ignoreName() function.
Attachment #762233 - Flags: review?(dflanagan) → review-
Hi David, Thanks for your inputs. I have made changes and squashed the commits. Please review.
Attachment #762233 - Flags: review- → review?(dflanagan)
Comment on attachment 762233 [details] [review] PR to show files beginning with dot r=djf for github commit b9f69cd Punam: let me know if you need assistance merging the PR.
Attachment #762233 - Flags: review?(dflanagan) → review+
Hi David, I will need your assistance in landing the PR on master as my account doesn't not have merge permissions. Thanks
Landed on master: https://github.com/mozilla-b2g/gaia/commit/a738aca47510da992901217604b5896123020eee
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Ben reported a bug about photos which are picked from Facebook app on Android devices and received via Bluetooth can't be viewed in Gallery app. That's because photos retrieved from Facebook app would be saved as files started with a period character("."). Since this patch has been merged into gaia::master so users could view these files, I would like to promote it to v1-train, so nominate as leo+. Please refer to bug 905153 for more information.
blocking-b2g: --- → leo?
not severe enough for a blocker. Moz is not taking anymore uplift requests
blocking-b2g: leo? → -
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.