Closed
Bug 823191
Opened 13 years ago
Closed 13 years ago
DeviceStorage enumerate doesn't see files with 0060 perms
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(blocking-basecamp:+, firefox19 fixed, firefox20 fixed, b2g18 fixed)
RESOLVED
FIXED
| blocking-basecamp | + |
People
(Reporter: dhylands, Assigned: dougt)
References
Details
Attachments
(1 file)
|
1.31 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
After applying attachment 693997 [details] [diff] [review] then the Gallery and Music apps no longer see files on the sdcard.
There are 2 reasons (that I can think of) which might be happening:
1 - The enumeration is happening in the child process (which would no longer have access)
2 - Even though the parent is running as root, it may still need to be a member of the sdcard_rw group in order to see the files (although I would have expected that if the parent process were using "other" priviledge then it shouldn't have been able to write anything - so my bet is still on 1)
Enumeration should be happening in the parent process already. So my guess is that the problem is the #2 one.
| Reporter | ||
Comment 3•13 years ago
|
||
Another possibility is that maybe the mediadb stuff is trying to directly open the files to parse the metatag info?
| Reporter | ||
Comment 4•13 years ago
|
||
It seems that DeviceStorage is returning the list of files fine.
The failure is occuring in mediadb.js here:
function parseMetadata(file, filename) {
if (!file.lastModifiedDate) {
and this causes:
[JavaScript Error: "NS_ERROR_FILE_ACCESS_DENIED: Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIDOMFile.lastModifiedDate]" {file: "app://gallery.b2g.hylands.org/shared/js/mediadb.js" line: 1189}]
So the file access is happening from the content process which fails because there is no permission.
So either this needs to be remoted, or devicestorage needs to provide the information so that mediadb.js doesn't need to try and access the locally.
| Assignee | ||
Comment 5•13 years ago
|
||
file should be a remoted blob. does file.length return without error?
We use fstat in here right?
| Assignee | ||
Comment 7•13 years ago
|
||
unrelated. the stat should happen in the parent process on the IO thread and be remoted down as part of the remote blob other meta info (like length).
| Assignee | ||
Comment 8•13 years ago
|
||
the problem is that the we do not remember the last modification date. The blob is created without one.
Assignee: nobody → doug.turner
| Assignee | ||
Comment 9•13 years ago
|
||
blocks a blocker, also pretty sure we can't ship w/o being able to use media files :)
blocking-basecamp: ? → +
| Assignee | ||
Comment 10•13 years ago
|
||
Attachment #694520 -
Flags: review?(bent.mozilla)
| Assignee | ||
Comment 11•13 years ago
|
||
Continue() makes the call if it should execute Run() or dispatch to the parent process.
| Assignee | ||
Comment 12•13 years ago
|
||
works on device and locally. sent to try, awaiting results.
| Assignee | ||
Comment 13•13 years ago
|
||
Updated•13 years ago
|
Attachment #694520 -
Flags: review?(bent.mozilla) → review+
| Assignee | ||
Comment 14•13 years ago
|
||
| Assignee | ||
Comment 15•13 years ago
|
||
status-firefox19:
--- → fixed
| Assignee | ||
Comment 16•13 years ago
|
||
status-b2g18:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•